[7.4] CCallbacks malfunction

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

[7.4] CCallbacks malfunction

Mülheims, Klaus
[7.4] CCallbacks malfunction

Hi,

We are using a part of the COAST-Framework dealing with Windows service interface to start our application as a windows service. We load the package WinService and it worked well with Images before 7.4.

Now I encounter the following problem:

The method WinServiceInterface->startDispatcherWithHandler:serviceName: creates a CCallback -Object and passes it to a dipatchTable-Object which is then passed to Windows by StartServiceCtrlDispatcher. This function then calls the Ccallback-Block.

And here is the problem: Obviously the call of the callback fails and Windows opens a requester with the text:

    Fehlgeschlagene Anwendung visual.exe, Version 0.0.0.0, fehlgeschlagenes Modul unknown, Version 0.0.0.0, Fehleradresse 0x00faaeb0.

BUT: my Image is still responding, it doesn't fail. I used the target-function of the sysinternals process explorer to determine the process, which opened the dialog and it was….: csrcs.exe, the Client Server Runtime Process. After pressing one of the two buttons, my Image terminates.

Very interesting:  The Fehleradresse 0x00faaeb0 is exactly the same value as the datum in the Ccallback-Object!

After studying the CCallback-Class-Comments I think the virtual machine has a bug:
Ccallback-Objects install a thunk in the heap to handle the callbacks of external code (like the Windows service API). Maybe this thunk is not working correctly.

Has anybody experienced the same problems?

Greetings

Klaus Mülheims

Collogia AG
Ubierring 11
 
50678 Köln
Germany
+49 221 336080
http://www.collogia.de


Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.

Reply | Threaded
Open this post in threaded view
|

Re: [7.4] CCallbacks malfunction

Christian Schuckmann
Ho,

which version of the WinServiceInterface do you use?
There is an old one - part of COAST and a new one, we
published to the public repository last year.
With the new one we did not yet encounter any problems -
at least it seems to work under 7.4 at a first glance.

-Christian

Mülheims wrote:

> Hi,
>
> We are using a part of the COAST-Framework dealing with Windows service
> interface to start our application as a windows service. We load the
> package WinService and it worked well with Images before 7.4.
>
> Now I encounter the following problem:
>
> The method WinServiceInterface->startDispatcherWithHandler:serviceName:
> creates a CCallback -Object and passes it to a dipatchTable-Object which
> is then passed to Windows by StartServiceCtrlDispatcher. This function
> then calls the Ccallback-Block.
>
> And here is the problem: Obviously the call of the callback fails and
> Windows opens a requester with the text:
>
>       Fehlgeschlagene Anwendung visual.exe, Version 0.0.0.0,
>       fehlgeschlagenes Modul unknown, Version 0.0.0.0, Fehleradresse
>       0x00faaeb0.
>
> BUT: my Image is still responding, it doesn't fail. I used the
> target-function of the sysinternals process explorer to determine the
> process, which opened the dialog and it was….: csrcs.exe, the Client
> Server Runtime Process. After pressing one of the two buttons, my Image
> terminates.
>
> Very interesting:  The Fehleradresse 0x00faaeb0 is exactly the same
> value as the datum in the Ccallback-Object!
>
> After studying the CCallback-Class-Comments I think the virtual machine
> has a bug:
> Ccallback-Objects install a thunk in the heap to handle the callbacks of
> external code (like the Windows service API). Maybe this thunk is not
> working correctly.
>
> Has anybody experienced the same problems?
>
> Greetings
>
> Klaus Mülheims
>
> Collogia AG
> Ubierring 11
>  
> 50678 Köln
> Germany
> +49 221 336080
> _http://www.collogia.de_
>
> ------------------------------------------------------------------------
> Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte
> Empfänger sind, informieren Sie bitte den Absender. Das unbefugte
> Kopieren oder Weiterleiten ist nicht gestattet. Wegen der
> Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>


--
Christian Schuckmann                           intelligent views gmbh
Development Manager Core Technologies          Julius-Reiber-Str. 17
Tel/Fax ++49 6151 5006 - 240/138               64293 Darmstadt
e-mail: [hidden email]                http://www.i-views.de/

Reply | Threaded
Open this post in threaded view
|

AW: [7.4] CCallbacks malfunction

Mülheims, Klaus
In reply to this post by Mülheims, Klaus
Hi Christian,

Thanks for this very quick response. I tried the new version, but... Exactly the same error.
Any other ideas?

Greetings

Klaus Mülheims


Collogia AG
Ubierring 11
 
50678 Köln
Germany
+49 221 336080
http://www.collogia.de

-----Ursprüngliche Nachricht-----
Von: Christian Schuckmann [mailto:[hidden email]]
Gesendet: Montag, 6. März 2006 16:19
An: [hidden email]
Betreff: Re: [7.4] CCallbacks malfunction

Ho,

which version of the WinServiceInterface do you use?
There is an old one - part of COAST and a new one, we
published to the public repository last year.
With the new one we did not yet encounter any problems -
at least it seems to work under 7.4 at a first glance.

-Christian

Mülheims wrote:

> Hi,
>
> We are using a part of the COAST-Framework dealing with Windows service
> interface to start our application as a windows service. We load the
> package WinService and it worked well with Images before 7.4.
>
> Now I encounter the following problem:
>
> The method WinServiceInterface->startDispatcherWithHandler:serviceName:
> creates a CCallback -Object and passes it to a dipatchTable-Object which
> is then passed to Windows by StartServiceCtrlDispatcher. This function
> then calls the Ccallback-Block.
>
> And here is the problem: Obviously the call of the callback fails and
> Windows opens a requester with the text:
>
>       Fehlgeschlagene Anwendung visual.exe, Version 0.0.0.0,
>       fehlgeschlagenes Modul unknown, Version 0.0.0.0, Fehleradresse
>       0x00faaeb0.
>
> BUT: my Image is still responding, it doesn't fail. I used the
> target-function of the sysinternals process explorer to determine the
> process, which opened the dialog and it was….: csrcs.exe, the Client
> Server Runtime Process. After pressing one of the two buttons, my Image
> terminates.
>
> Very interesting:  The Fehleradresse 0x00faaeb0 is exactly the same
> value as the datum in the Ccallback-Object!
>
> After studying the CCallback-Class-Comments I think the virtual machine
> has a bug:
> Ccallback-Objects install a thunk in the heap to handle the callbacks of
> external code (like the Windows service API). Maybe this thunk is not
> working correctly.
>
> Has anybody experienced the same problems?
>
> Greetings
>
> Klaus Mülheims
>
> Collogia AG
> Ubierring 11
>  
> 50678 Köln
> Germany
> +49 221 336080
> _http://www.collogia.de_
>
> ------------------------------------------------------------------------
> Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte
> Empfänger sind, informieren Sie bitte den Absender. Das unbefugte
> Kopieren oder Weiterleiten ist nicht gestattet. Wegen der
> Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>


--
Christian Schuckmann                           intelligent views gmbh
Development Manager Core Technologies          Julius-Reiber-Str. 17
Tel/Fax ++49 6151 5006 - 240/138               64293 Darmstadt
e-mail: [hidden email]                http://www.i-views.de/



Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
Reply | Threaded
Open this post in threaded view
|

AW: [7.4] CCallbacks malfunction

Mülheims, Klaus
In reply to this post by Mülheims, Klaus
Hi,

I solved the problem. The DataExecutionPrevention (DEP) of Windows XP disliked the Callback into the heap....... :-)
After switching of this security-option, it works as expected. But this damned OS told me nothing about the reason, why it tried to killed my process. This morning when I booted my machine, it told me with much requesters about the problems it had yesterday. Very dissatisfying!

Ok, my next question to all, especially to Alan: What is the official cincom point of view: Is this a bug in the thunk of the CCallback-Object (thunk memory are must be marked as executable) or must the DEP switched of for smalltalk images?

Greetings

Klaus Mülheims


Collogia AG
Ubierring 11
 
50678 Köln
Germany
+49 221 336080
http://www.collogia.de

-----Ursprüngliche Nachricht-----
Von: Mülheims, Klaus [mailto:[hidden email]]
Gesendet: Montag, 6. März 2006 16:50
An: Christian Schuckmann; [hidden email]
Betreff: AW: [7.4] CCallbacks malfunction

Hi Christian,

Thanks for this very quick response. I tried the new version, but... Exactly the same error.
Any other ideas?

Greetings

Klaus Mülheims


Collogia AG
Ubierring 11
 
50678 Köln
Germany
+49 221 336080
http://www.collogia.de

-----Ursprüngliche Nachricht-----
Von: Christian Schuckmann [mailto:[hidden email]]
Gesendet: Montag, 6. März 2006 16:19
An: [hidden email]
Betreff: Re: [7.4] CCallbacks malfunction

Ho,

which version of the WinServiceInterface do you use?
There is an old one - part of COAST and a new one, we
published to the public repository last year.
With the new one we did not yet encounter any problems -
at least it seems to work under 7.4 at a first glance.

-Christian

Mülheims wrote:

> Hi,
>
> We are using a part of the COAST-Framework dealing with Windows service
> interface to start our application as a windows service. We load the
> package WinService and it worked well with Images before 7.4.
>
> Now I encounter the following problem:
>
> The method WinServiceInterface->startDispatcherWithHandler:serviceName:
> creates a CCallback -Object and passes it to a dipatchTable-Object which
> is then passed to Windows by StartServiceCtrlDispatcher. This function
> then calls the Ccallback-Block.
>
> And here is the problem: Obviously the call of the callback fails and
> Windows opens a requester with the text:
>
>       Fehlgeschlagene Anwendung visual.exe, Version 0.0.0.0,
>       fehlgeschlagenes Modul unknown, Version 0.0.0.0, Fehleradresse
>       0x00faaeb0.
>
> BUT: my Image is still responding, it doesn't fail. I used the
> target-function of the sysinternals process explorer to determine the
> process, which opened the dialog and it was….: csrcs.exe, the Client
> Server Runtime Process. After pressing one of the two buttons, my Image
> terminates.
>
> Very interesting:  The Fehleradresse 0x00faaeb0 is exactly the same
> value as the datum in the Ccallback-Object!
>
> After studying the CCallback-Class-Comments I think the virtual machine
> has a bug:
> Ccallback-Objects install a thunk in the heap to handle the callbacks of
> external code (like the Windows service API). Maybe this thunk is not
> working correctly.
>
> Has anybody experienced the same problems?
>
> Greetings
>
> Klaus Mülheims
>
> Collogia AG
> Ubierring 11
>  
> 50678 Köln
> Germany
> +49 221 336080
> _http://www.collogia.de_
>
> ------------------------------------------------------------------------
> Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte
> Empfänger sind, informieren Sie bitte den Absender. Das unbefugte
> Kopieren oder Weiterleiten ist nicht gestattet. Wegen der
> Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>


--
Christian Schuckmann                           intelligent views gmbh
Development Manager Core Technologies          Julius-Reiber-Str. 17
Tel/Fax ++49 6151 5006 - 240/138               64293 Darmstadt
e-mail: [hidden email]                http://www.i-views.de/



Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.


Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
Reply | Threaded
Open this post in threaded view
|

[7.4][Pollock]Button labels not centered

Carl Gundel
When I use the example code in the Pollock docs for labeling a button the
label doesn't center.

  label := Pollock.DisplayLabel string: 'Push'.
  button addComponent: label.

Any suggestions?

Centered labels would make sense as a default feature of a button IMHO.

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com

Reply | Threaded
Open this post in threaded view
|

Re: AW: [7.4] CCallbacks malfunction

Alan Knight-2
In reply to this post by Mülheims, Klaus
At 03:33 AM 3/7/2006, Mülheims, Klaus wrote:
>Hi,
>
>I solved the problem. The DataExecutionPrevention (DEP) of Windows XP disliked the Callback into the heap....... :-)
>After switching of this security-option, it works as expected. But this damned OS told me nothing about the reason, why it tried to killed my process. This morning when I booted my machine, it told me with much requesters about the problems it had yesterday. Very dissatisfying!
>
>Ok, my next question to all, especially to Alan: What is the official cincom point of view: Is this a bug in the thunk of the CCallback-Object (thunk memory are must be marked as executable) or must the DEP switched of for smalltalk images?

By Alan do you mean me? And if so, why? This is about as far from my areas of expertise as it gets. I would think that thunk memory ought to be marked executable, but I really have no idea what's going on in that area. If you mean a different Alan, ignore this message :-)

>Greetings
>
>Klaus Mülheims
>
>
>Collogia AG
>Ubierring 11
>
>50678 Köln
>Germany
>+49 221 336080
>http://www.collogia.de
>
>-----Ursprüngliche Nachricht-----
>Von: Mülheims, Klaus [mailto:[hidden email]]
>Gesendet: Montag, 6. März 2006 16:50
>An: Christian Schuckmann; [hidden email]
>Betreff: AW: [7.4] CCallbacks malfunction
>
>Hi Christian,
>
>Thanks for this very quick response. I tried the new version, but... Exactly the same error.
>Any other ideas?
>
>Greetings
>
>Klaus Mülheims
>
>
>Collogia AG
>Ubierring 11
>
>50678 Köln
>Germany
>+49 221 336080
>http://www.collogia.de
>
>-----Ursprüngliche Nachricht-----
>Von: Christian Schuckmann [mailto:[hidden email]]
>Gesendet: Montag, 6. März 2006 16:19
>An: [hidden email]
>Betreff: Re: [7.4] CCallbacks malfunction
>
>Ho,
>
>which version of the WinServiceInterface do you use?
>There is an old one - part of COAST and a new one, we
>published to the public repository last year.
>With the new one we did not yet encounter any problems -
>at least it seems to work under 7.4 at a first glance.
>
>-Christian
>
>Mülheims wrote:
>> Hi,
>>
>> We are using a part of the COAST-Framework dealing with Windows service
>> interface to start our application as a windows service. We load the
>> package WinService and it worked well with Images before 7.4.
>>
>> Now I encounter the following problem:
>>
>> The method WinServiceInterface->startDispatcherWithHandler:serviceName:
>> creates a CCallback -Object and passes it to a dipatchTable-Object which
>> is then passed to Windows by StartServiceCtrlDispatcher. This function
>> then calls the Ccallback-Block.
>>
>> And here is the problem: Obviously the call of the callback fails and
>> Windows opens a requester with the text:
>>
>>       Fehlgeschlagene Anwendung visual.exe, Version 0.0.0.0,
>>       fehlgeschlagenes Modul unknown, Version 0.0.0.0, Fehleradresse
>>       0x00faaeb0.
>>
>> BUT: my Image is still responding, it doesn't fail. I used the
>> target-function of the sysinternals process explorer to determine the
>> process, which opened the dialog and it was….: csrcs.exe, the Client
>> Server Runtime Process. After pressing one of the two buttons, my Image
>> terminates.
>>
>> Very interesting:  The Fehleradresse 0x00faaeb0 is exactly the same
>> value as the datum in the Ccallback-Object!
>>
>> After studying the CCallback-Class-Comments I think the virtual machine
>> has a bug:
>> Ccallback-Objects install a thunk in the heap to handle the callbacks of
>> external code (like the Windows service API). Maybe this thunk is not
>> working correctly.
>>
>> Has anybody experienced the same problems?
>>
>> Greetings
>>
>> Klaus Mülheims
>>
>> Collogia AG
>> Ubierring 11
>>  
>> 50678 Köln
>> Germany
>> +49 221 336080
>> _http://www.collogia.de_
>>
>> ------------------------------------------------------------------------
>> Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte
>> Empfänger sind, informieren Sie bitte den Absender. Das unbefugte
>> Kopieren oder Weiterleiten ist nicht gestattet. Wegen der
>> Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>>
>
>
>--
>Christian Schuckmann                           intelligent views gmbh
>Development Manager Core Technologies          Julius-Reiber-Str. 17
>Tel/Fax ++49 6151 5006 - 240/138               64293 Darmstadt
>e-mail: [hidden email]                http://www.i-views.de/
>
>
>
>Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>
>
>Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross

Reply | Threaded
Open this post in threaded view
|

AW: AW: [7.4] CCallbacks malfunction

Mülheims, Klaus
In reply to this post by Mülheims, Klaus
Hi Alan,

Sorry, used accidently the wrong name..... I meant Eliot

Greetings

Klaus Mülheims


Collogia AG
Ubierring 11
 
50678 Köln
Germany
+49 221 336080
http://www.collogia.de

-----Ursprüngliche Nachricht-----
Von: Alan Knight [mailto:[hidden email]]
Gesendet: Dienstag, 7. März 2006 15:44
An: Mülheims, Klaus; Christian Schuckmann; [hidden email]
Betreff: Re: AW: [7.4] CCallbacks malfunction

At 03:33 AM 3/7/2006, Mülheims, Klaus wrote:
>Hi,
>
>I solved the problem. The DataExecutionPrevention (DEP) of Windows XP disliked the Callback into the heap....... :-)
>After switching of this security-option, it works as expected. But this damned OS told me nothing about the reason, why it tried to killed my process. This morning when I booted my machine, it told me with much requesters about the problems it had yesterday. Very dissatisfying!
>
>Ok, my next question to all, especially to Alan: What is the official cincom point of view: Is this a bug in the thunk of the CCallback-Object (thunk memory are must be marked as executable) or must the DEP switched of for smalltalk images?

By Alan do you mean me? And if so, why? This is about as far from my areas of expertise as it gets. I would think that thunk memory ought to be marked executable, but I really have no idea what's going on in that area. If you mean a different Alan, ignore this message :-)

>Greetings
>
>Klaus Mülheims
>
>
>Collogia AG
>Ubierring 11
>
>50678 Köln
>Germany
>+49 221 336080
>http://www.collogia.de
>
>-----Ursprüngliche Nachricht-----
>Von: Mülheims, Klaus [mailto:[hidden email]]
>Gesendet: Montag, 6. März 2006 16:50
>An: Christian Schuckmann; [hidden email]
>Betreff: AW: [7.4] CCallbacks malfunction
>
>Hi Christian,
>
>Thanks for this very quick response. I tried the new version, but... Exactly the same error.
>Any other ideas?
>
>Greetings
>
>Klaus Mülheims
>
>
>Collogia AG
>Ubierring 11
>
>50678 Köln
>Germany
>+49 221 336080
>http://www.collogia.de
>
>-----Ursprüngliche Nachricht-----
>Von: Christian Schuckmann [mailto:[hidden email]]
>Gesendet: Montag, 6. März 2006 16:19
>An: [hidden email]
>Betreff: Re: [7.4] CCallbacks malfunction
>
>Ho,
>
>which version of the WinServiceInterface do you use?
>There is an old one - part of COAST and a new one, we
>published to the public repository last year.
>With the new one we did not yet encounter any problems -
>at least it seems to work under 7.4 at a first glance.
>
>-Christian
>
>Mülheims wrote:
>> Hi,
>>
>> We are using a part of the COAST-Framework dealing with Windows service
>> interface to start our application as a windows service. We load the
>> package WinService and it worked well with Images before 7.4.
>>
>> Now I encounter the following problem:
>>
>> The method WinServiceInterface->startDispatcherWithHandler:serviceName:
>> creates a CCallback -Object and passes it to a dipatchTable-Object which
>> is then passed to Windows by StartServiceCtrlDispatcher. This function
>> then calls the Ccallback-Block.
>>
>> And here is the problem: Obviously the call of the callback fails and
>> Windows opens a requester with the text:
>>
>>       Fehlgeschlagene Anwendung visual.exe, Version 0.0.0.0,
>>       fehlgeschlagenes Modul unknown, Version 0.0.0.0, Fehleradresse
>>       0x00faaeb0.
>>
>> BUT: my Image is still responding, it doesn't fail. I used the
>> target-function of the sysinternals process explorer to determine the
>> process, which opened the dialog and it was....: csrcs.exe, the Client
>> Server Runtime Process. After pressing one of the two buttons, my Image
>> terminates.
>>
>> Very interesting:  The Fehleradresse 0x00faaeb0 is exactly the same
>> value as the datum in the Ccallback-Object!
>>
>> After studying the CCallback-Class-Comments I think the virtual machine
>> has a bug:
>> Ccallback-Objects install a thunk in the heap to handle the callbacks of
>> external code (like the Windows service API). Maybe this thunk is not
>> working correctly.
>>
>> Has anybody experienced the same problems?
>>
>> Greetings
>>
>> Klaus Mülheims
>>
>> Collogia AG
>> Ubierring 11
>>  
>> 50678 Köln
>> Germany
>> +49 221 336080
>> _http://www.collogia.de_
>>
>> ------------------------------------------------------------------------
>> Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte
>> Empfänger sind, informieren Sie bitte den Absender. Das unbefugte
>> Kopieren oder Weiterleiten ist nicht gestattet. Wegen der
>> Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>>
>
>
>--
>Christian Schuckmann                           intelligent views gmbh
>Development Manager Core Technologies          Julius-Reiber-Str. 17
>Tel/Fax ++49 6151 5006 - 240/138               64293 Darmstadt
>e-mail: [hidden email]                http://www.i-views.de/
>
>
>
>Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
>
>
>Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross



Diese Nachricht ist vertraulich. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender. Das unbefugte Kopieren oder Weiterleiten ist nicht gestattet. Wegen der Manipulierbarkeit von E-Mails übernehmen wir keine Haftung für den Inhalt.
Reply | Threaded
Open this post in threaded view
|

Re: [7.4][Pollock]Button labels not centered

Samuel S. Shuster <sames@interaccess.com>
In reply to this post by Carl Gundel
Carl,

>When I use the example code in the Pollock docs for labeling a button the
>label doesn't center.
>
>  label := Pollock.DisplayLabel string: 'Push'.
>  button addComponent: label.
>
>Any suggestions?

  label := Pollock.DisplayLabel string: 'Push'.
  button addComponent: (label frame: AlignmentFrame new).

>Centered labels would make sense as a default feature of a button IMHO.

We will be adding a addLabelString: helper API in the future, which will do
centered frames by default. However, note the api we use... "addComponent:". It
doesn't know what the pane is, so how could it know that a label should have
it's frame changed to an AlignmentFrame?

Defaults for all panes are frames which are origin 0@0. That's guaranteed, and
consistent. Changing that for a single pane makes it an exception you have to
learn. The more exceptions to an API's behavior, the more complex the Framework.
Not happening.

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?

Reply | Threaded
Open this post in threaded view
|

Re: [7.4][Pollock]Button labels not centered

Michael Lucas-Smith
In reply to this post by Carl Gundel
If a DisplayLabel is not a wrapping label, Pollock seems to ignore the
width set on your frame. I'd say this is a bug personally. Because it
ignores the width, it cannot right align or center. If you tell it
it's wordwrapped, it'll suddenly do what you want it to.

Cheers,
Michael

> When I use the example code in the Pollock docs for labeling a button the
> label doesn't center.

>   label := Pollock.DisplayLabel string: 'Push'.
>   button addComponent: label.

> Any suggestions?

> Centered labels would make sense as a default feature of a button IMHO.

> -Carl Gundel, author of Liberty BASIC
> http://www.libertybasic.com

Reply | Threaded
Open this post in threaded view
|

Re: [7.4][Pollock]Button labels not centered

Samuel S. Shuster <sames@interaccess.com>
Michael,

>If a DisplayLabel is not a wrapping label, Pollock seems to ignore the
>width set on your frame. I'd say this is a bug personally. Because it
>ignores the width, it cannot right align or center. If you tell it
>it's wordwrapped, it'll suddenly do what you want it to.

This was a conscience design decision. DisplayLabels and DisplayImages are the
only panes that have inherent extents.

However, I/we understand the issue, and for that we have a solution in the
wings: PinnedFrame.

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?