resource problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

resource problem

pdigonzelli
hi all , I am creating a Presenter and a resource by code.
All the thing is ok . I can open an show the generated presenter. I can edi
it in the view composer.
The problem is when I save the image and leave Dolphin.
If I open Dolphin I have the follwing error.

ReferenceView can't load 'CachaPresenter.Default view'. But the presenter
exist an I can open the Presenter View with ViewComposer.
I ommit that wallback and all works ok.

If I type in a workspace CachaPresenter show, and all works ok.

The code to create the resource is:


generateResourceForClass: aClass fromClass: aFromClass

|resourceIdentifier resource view r|

resourceIdentifier := ResourceIdentifier class: aFromClass name: aFromClass
defaultView. "Here i open the Default view resource from the superclass"

r := resourceIdentifier copy. "Here I create a copy"

r owningClass: aClass. "I change the owning class to my class"

resource := ViewResource defaultWritable.

resource save: r load. "generate a new resource"

SessionManager current resourceManager resourceAt: resourceIdentifier put:
resource. "save it"



I think the problem is that is something wrong with the Dictionary which
stores the reference to that resource.
How can i solve this problem?

TIA
Pablo






ReferenceView>>referee
ReferenceView>>onFullyCreated
ShellView(View)>>wmParentNotify:wParam:lParam:
ShellView(View)>>dispatchMessage:wParam:lParam:
[] in InputState>>wndProc:message:wParam:lParam:cookie:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>callback:evaluate:
InputState>>wndProc:message:wParam:lParam:cookie:
ReferenceView(View)>>basicCreateAt:extent:
ReferenceView(View)>>createAt:extent:
MessageSend(MessageSendAbstract)>>value
[] in MessageSequence(MessageSequenceAbstract)>>value
OrderedCollection>>do:
MessageSequence>>messagesDo:
MessageSequence(MessageSequenceAbstract)>>value
ReferenceView(View)>>state:
ViewState>>restore
[] in ViewState>>restore
OrderedCollection>>do:
ViewState>>restore
[] in DevelopmentSessionManager(GUISessionManager)>>restoreWindowState
ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry
[] in ExceptionHandler(ExceptionHandlerAbstract)>>try:
BlockClosure>>ifCurtailed:
BlockClosure>>ensure:
ExceptionHandler(ExceptionHandlerAbstract)>>try:
BlockClosure>>on:do:
[] in DevelopmentSessionManager(GUISessionManager)>>restoreWindowState
OrderedCollection>>do:
DevelopmentSessionManager(GUISessionManager)>>restoreWindowState
[] in DevelopmentSessionManager(GUISessionManager)>>basicTertiaryStartup
BlockClosure>>ifCurtailed:
BlockClosure>>ensure:
DevelopmentSessionManager(GUISessionManager)>>basicTertiaryStartup
DevelopmentSessionManager(SessionManager)>>tertiaryStartup
DevelopmentSessionManager(GUISessionManager)>>tertiaryStartup
DevelopmentSessionManager>>tertiaryStartup
[] in DevelopmentSessionManager(SessionManager)>>onStartup:
BlockClosure>>ensure:
[] in DevelopmentSessionManager(SessionManager)>>onStartup:
BlockClosure>>ifCurtailed:
BlockClosure>>ensure:
DevelopmentSessionManager(SessionManager)>>onStartup:
ProcessorScheduler>>onStartup:
[] in ProcessorScheduler>>vmi:list:no:with:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>vmi:list:no:with:
DevelopmentSessionManager>>snapshot:
DevelopmentSessionManager>>snapshot
DevelopmentSessionManager>>saveImageDefault


Reply | Threaded
Open this post in threaded view
|

Re: resource problem

Schwab,Wilhelm K
Pablo,

Do you know how to make a backup of your image?  If not, _please_ learn
about it before acting on the following.  In short, you should copy the
image, changes, and sources file together; zip files do a great job.


> hi all , I am creating a Presenter and a resource by code.
> All the thing is ok . I can open an show the generated presenter. I can edi
> it in the view composer.
> The problem is when I save the image and leave Dolphin.
> If I open Dolphin I have the follwing error.
>
> ReferenceView can't load 'CachaPresenter.Default view'.

This and callstack you posted look as though you have either an open or
zombie presenter that is unable to load CachaPresenter.Default view
during startup.  Look around for an open view composer (just a guess) or
other shell; it might be minimized or simply covered by other shells.
Failing that, the panic ("scream") button might fix the problem.  Be
sure to save the content of any workspaces, etc., before using the panic
button.  You would then save the image with the offending shell closed,
and exit and restart Dolphin to see if the problem is gone.



 > But the presenter
> exist an I can open the Presenter View with ViewComposer.
> I ommit that wallback and all works ok.
>
> If I type in a workspace CachaPresenter show, and all works ok.

That makes me suspect that it might be a zombie view.  However, I freely
admit that view resources are slightly mysterious to me, even
(especially<g>) after getting ViewGenerator to create them.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: resource problem

Chris Uppal-3
Bill, Pablo,

> This and callstack you posted look as though you have either an open or
> zombie presenter that is unable to load CachaPresenter.Default view
> during startup.  Look around for an open view composer (just a guess) or
> other shell; it might be minimized or simply covered by other shells.
> Failing that, the panic ("scream") button might fix the problem.

Sounds like a zombie to me too.  One thing to add is that half-created zombie
views usually show up in the "Window" menu of the IDE tools, and can be opened
and killed from there without needing to do a full "panic".

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: resource problem

Bill Dargel
Chris Uppal wrote:
> Sounds like a zombie to me too.  One thing to add is that half-created zombie
> views usually show up in the "Window" menu of the IDE tools, and can be opened
> and killed from there without needing to do a full "panic".

Yep, they show up near the middle of the "Window" menu with a notation
of "(hidden)" on them. I do like being able to clean them up from there.
By selecting one in the menu, it gets shown, at which point you can
simply close the (now no longer zombie) view. I like doing that much
more than the full "panic", as you don't lose the current working
context of your open browsers.

Liked it so well that, when during some automated testing I managed to
create tens or hundreds of hidden (zombie) views, I worked out the
following incant:

        View topLevelViews do: [:each |
                each isWindowVisible ifFalse: [each destroy]].

That'll clean up all the hidden views without the need for a full
"panic".

-------------------------------------------
Bill Dargel            [hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA


Reply | Threaded
Open this post in threaded view
|

Re: resource problem

Andy Bower-3
Bill,

[snip]

> Liked it so well that, when during some automated testing I managed to
> create tens or hundreds of hidden (zombie) views, I worked out the
> following incant:
>
> View topLevelViews do: [:each |
> each isWindowVisible ifFalse: [each destroy]].
>
> That'll clean up all the hidden views without the need for a full
> "panic".

And, indeed, that's exactly what Panic used to do in the days before
the appearence of the Zombie views on the Window menu. Sometimes,
though, we found we would get errors within that incantation or some
zombies were left behind so it was changed to the current version
behind the command.

Best regards


Andy Bower
Dolphin Support
www.object-arts.com