KeyBinder questions

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

KeyBinder questions

Sophie424
I am trying to make KeyBinder to display the key combination on its menu but
am hitting a "Decompiler" error (RemoteString past end of file). I get the
same error when I even try to do "Edit Key Binding" for most of the
bindings. Any ideas?

btw - how do I get an ascii out of the stack trace to post?

Thanks.

Decompiler>>

decompileBlock: aBlock
 | startpc end homeClass blockNode home |
 (home := aBlock home) ifNil: [^ nil].
 (homeClass := home methodClass) ifNil: [^ nil].
 method := home method.
 constructor := DecompilerConstructor new.
 self withTempNames: method methodNode tempNames.
 self initSymbols: homeClass.
 startpc := aBlock startpc.
 end := aBlock endPC.
 stack := OrderedCollection new: method frameSize.
 caseExits := OrderedCollection new.
 statements := OrderedCollection new: 20.
 super method: method pc: startpc - 5.
 blockNode := self blockTo: end.
 stack isEmpty ifFalse: [self error: 'stack not empty'].
 ^ blockNode statements first



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KeyBinder questions

Sophie424
Keith told me how to get the stack trace ... here it is. btw: I'm trying to
use Ramon's latest image.

Subject: [BUG]RemoteString(Object)>>error:

here insert explanation of what you were doing, suspect changes you've made
and so forth.

23 October 2007 7:38:45 pm

VM: Win32 - a SmalltalkImage
Image: Squeak3.9 [latest update: #7067]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir C:\des\desktop\ocean\ramon oct 07
Trusted Dir C:\des\desktop\ocean\ramon oct 07\desmond
Untrusted Dir C:\My Squeak\desmond

RemoteString(Object)>>error:
 Receiver: a RemoteString
 Arguments and temporary variables:
  aString:  'RemoteString past end of file'
 Receiver's instance variables:
  sourceFileNumber:  2
  filePositionHi:  9704925

RemoteString>>text
 Receiver: a RemoteString
 Arguments and temporary variables:
  theFile:  MultiByteFileStream: 'C:\des\desktop\ocean\ramon oct
07\SqueakDev.chan...etc...
 Receiver's instance variables:
  sourceFileNumber:  2
  filePositionHi:  9704925

CompiledMethod>>getSourceFromFile
 Receiver: a CompiledMethod (2838)
 Arguments and temporary variables:
  position:  9704925
 Receiver's instance variables:
a CompiledMethod (2838)

CompiledMethod>>methodNode
 Receiver: a CompiledMethod (2838)
 Arguments and temporary variables:
  source:  nil
 Receiver's instance variables:
a CompiledMethod (2838)


--- The full stack ---
RemoteString(Object)>>error:
RemoteString>>text
CompiledMethod>>getSourceFromFile
CompiledMethod>>methodNode
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Decompiler>>decompileBlock:
KeyBindingConfigMorph>>decompileBlock:
KeyBindingConfigMorph>>keyBlockText
PluggableTextMorph>>getText
PluggableTextMorph>>on:text:accept:readSelection:menu:
PluggableTextMorph class>>on:text:accept:readSelection:menu:
PluggableTextMorph class>>on:text:accept:
KeyBindingConfigMorph>>textFieldWithLabel:getter:setter:lines:
KeyBindingConfigMorph>>keyBlockTextField
KeyBindingConfigMorph>>initializeSubmorphs
KeyBindingConfigMorph>>initializeWithTarget:
KeyBindingConfigMorph class>>on:
KeyBinding>>openConfig
[] in MenuItemMorph>>invokeWithEvent: {[(selArgCount := selector numArgs) =
0   ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
MenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MenuMorph(Morph)>>processEvent:
MenuMorph>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self.  ActiveEvent
:= anEvent.  e := anEvent     transformedB...]}
[] in PasteUpMorph>>becomeActiveDuring: {[aBlock value]}
BlockContext>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendMouseEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor: {[:h |  ActiveHand := h.  h
processEvents.  capturingGesture := capturingGest...]}
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.
false] whileFalse.  nil]}
[] in BlockContext>>newProcess {[self value.  Processor terminateActive]}

"itsme213" <[hidden email]> wrote in message
news:ffm2ja$us0$[hidden email]...

>I am trying to make KeyBinder to display the key combination on its menu
>but am hitting a "Decompiler" error (RemoteString past end of file). I get
>the same error when I even try to do "Edit Key Binding" for most of the
>bindings. Any ideas?
>
> btw - how do I get an ascii out of the stack trace to post?
>
> Thanks.
>
> Decompiler>>
>
> decompileBlock: aBlock
> | startpc end homeClass blockNode home |
> (home := aBlock home) ifNil: [^ nil].
> (homeClass := home methodClass) ifNil: [^ nil].
> method := home method.
> constructor := DecompilerConstructor new.
> self withTempNames: method methodNode tempNames.
> self initSymbols: homeClass.
> startpc := aBlock startpc.
> end := aBlock endPC.
> stack := OrderedCollection new: method frameSize.
> caseExits := OrderedCollection new.
> statements := OrderedCollection new: 20.
> super method: method pc: startpc - 5.
> blockNode := self blockTo: end.
> stack isEmpty ifFalse: [self error: 'stack not empty'].
> ^ blockNode statements first



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Re: KeyBinder questions

Ramon Leon-5
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of itsme213
> Sent: Tuesday, October 23, 2007 5:40 PM
> To: [hidden email]
> Subject: [Seaside] Re: KeyBinder questions
>
> Keith told me how to get the stack trace ... here it is. btw:
> I'm trying to use Ramon's latest image.

I just fixed my image.  Just close Keybinder, unload via Monticello, and
reload via SqueakMap to fix it, or download my image again.

Ramon Leon
http://onsmalltalk.com 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: KeyBinder questions

Sophie424

"Ramon Leon" <[hidden email]> wrote in message
news:029c01c815de$02a43ca0$[hidden email]...
> I just fixed my image.  Just close Keybinder, unload via Monticello, and
> reload via SqueakMap to fix it,

Did the trick, thanks a bunch. (Didn't know I could "unload" either :-)



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

User Toolbar

keith1y
In reply to this post by Sophie424
I am wanting to make the toolbar available to my "admin" users for my
app, but this appears difficult due to the current architecture since
Seaside doesnt handle user state at all.

any ideas would be appreciated

thanks in advance

Keith
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: User Toolbar

Sylvain pralon
I already done something like this. I had a user management system and a login system.
I subclasses the wasession class to add a user instance variable. After I use my session class for my seaside app.
After login, I set the user variable of my session. So I can display a toolbar depending on the state a my user which is stored in my session variable.

It's maybe a little bit old now. Seaside changed a lot since. Maybe there is an easier way to do it now.

hope this helps.

Sylvain



2007/10/24, Keith Hodges < [hidden email]>:
I am wanting to make the toolbar available to my "admin" users for my
app, but this appears difficult due to the current architecture since
Seaside doesnt handle user state at all.

any ideas would be appreciated

thanks in advance

Keith
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: User Toolbar

Sebastian Sastre-2
In reply to this post by keith1y
Hi Keith,

        I'm not sure what do you mean with "Seaside doesnt handle user state
at all". Any object handle it's state.

        I think I would make that the component that should have the toolbar
deduct to render it or not depending on the user (as in fact I made for one
button of a toolbar in an application I made).

        Could be something like this:

        BlahComponent>>renderContentOn: html

        self shouldRenderToolbar ifTrue:[
                html render: self toolbar].

        ...

        BlahComponent>>shouldRenderToolbar

                ^ self session userIsAdmin

        BlahSession>>userIsAdmin
                ^ self user username = 'admin'

        cheers,

Sebastian Sastre


 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Keith Hodges
> Enviado el: Martes, 23 de Octubre de 2007 23:20
> Para: Seaside - general discussion
> Asunto: [Seaside] User Toolbar
>
> I am wanting to make the toolbar available to my "admin"
> users for my app, but this appears difficult due to the
> current architecture since Seaside doesnt handle user state at all.
>
> any ideas would be appreciated
>
> thanks in advance
>
> Keith
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside