|
|
Re: Missing API [message #73453 is a reply to message #73435] |
Mon, 11 February 2008 12:09 |
|
Hi Benjamin,
Thx for the clarification. I must admit that I did not consider
implications through shared resources. Is this behaviour a designed
feature of RAP to optimize server-side resource usage or is it more a
relict of the historical roots of RWT?
Wouldn't usage counters be a way to have both, shared resources and reeal
disposal after the last usage has been finished?
BTW. how exactly are the current disposal semantics of these shared
resources?
Cheers
/Eike
Benjamin Muskalla wrote:
> Hi Eike,
> the problem behind these specific methods is that resources are shared
> across several sessions. This means that disposing a resource in one
> session will invalidate it in all other sessions which leads to very
> strange problems.
> Implementing these methods as no-ops is against the rule of the RAP
> project as we don't want to provide "empty" API. Implementing eg
> dispose() as no-op would also mean that the semantic would change as you
> can not rely on the return value of "isDisposed".
> Would we implement these methods on a per-session base which would mean
> that holding the dispose state of resources as a session-only state
> would make no sense in any way.
> There were already some discussions on this newsgroup but there are no
> plans yet how to overcome this obstacle. One approach would be to
> implement these methods on your own with a bundle patch fragment or the
> much cleaner way you described to use a proxy which - depending on the
> runtime - decides what to do.
> Hope that helps to clarify the situation.
> Benny
> Eike Stepper wrote:
>> Hi,
>>
>> I noticed that the RAP implementation of the
>> org.eclipse.swt.graphics.Resource class is missing the following methods:
>>
>> dispose()
>> getDevice()
>> isDisposed()
>>
>> This is very inconvenient when developing multi channel applications,
>> i.e. RCP and RAP out of a single code base.
>>
>> Would it be possible that these methods become added?
>>
>> Cheers
>> /Eike
>>
>>
>>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.02815 seconds