| Author |
Getting aspect name from controller
|
|
| Sreenath G K 2005-10-07, 8:04 am |
| Hi all,
In order to acces the aspect name or Widget id from a controller i an using
aController view container container cantainer spec name. Can any one
suggest a way out rather than the which i am using.I am using visualWorks
7.3.
TIA
| |
| Sasa Prokic 2005-10-07, 8:04 am |
| I solved the same problem in generic way. You need several methods. It
works for me, hope that it will help you too.
****************************************
***********************************
VisualPart>>widgetName
"Returnes a widget name (ID)spec referenced by my container. This method
actualy searches up to hierarchy until it comes to SpecWrapper tp
returne spec name of wrapped widget"
"010926 SP - Created"
^self spec
ifNotNil: [:referencedSpec |
referencedSpec name]
****************************************
***********************************
VisualPart>>spec
"Returnes a widget spec referenced by my container. This method actualy
searches up to hierarchy until it comes to SpecWrapper tp returne spec
of wrapped widget"
"010926 SP - Created"
^self container
ifNotNil: [:visualPart | visualPart spec]
****************************************
***********************************
Controller>>widgetName
"Read doc in widgetName method in VisualPart class"
"011012 SP - Created"
^self view widgetName
****************************************
***********************************
Sreenath G K wrote:
> Hi all,
> In order to acces the aspect name or Widget id from a controller i an using
> aController view container container cantainer spec name. Can any one
> suggest a way out rather than the which i am using.I am using visualWorks
> 7.3.
> TIA
>
>
| |
| Sreenath G K 2005-10-07, 8:04 am |
| Hi,
Thank you so much for the reply.I am a beginner in smalltalk,so i have some
difficulty in understanding the code.
I have tried it but i could not reach until SpecWrapper.
The container that i acheived was Scrollwrapper.
so i would like to request u to be a hand in this crisis.
TIA
++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++
+++++
I solved the same problem in generic way. You need several methods. It
works for me, hope that it will help you too.
****************************************
***********************************
VisualPart>>widgetName
"Returnes a widget name (ID)spec referenced by my container. This method
actualy searches up to hierarchy until it comes to SpecWrapper tp
returne spec name of wrapped widget"
"010926 SP - Created"
^self spec
ifNotNil: [:referencedSpec |
referencedSpec name]
****************************************
***********************************
VisualPart>>spec
"Returnes a widget spec referenced by my container. This method actualy
searches up to hierarchy until it comes to SpecWrapper tp returne spec
of wrapped widget"
"010926 SP - Created"
^self container
ifNotNil: [:visualPart | visualPart spec]
****************************************
***********************************
Controller>>widgetName
"Read doc in widgetName method in VisualPart class"
"011012 SP - Created"
^self view widgetName.
****************************************
***********************************
[color=darkred]
> Sreenath G K wrote:
using[color=darkred]
visualWorks[color=darkred]
| |
| Sasa Prokic 2005-10-07, 8:04 am |
| Did you send widgetName to the controller ?
What was the result ?
Sreenath G K wrote:
> Hi,
>
> Thank you so much for the reply.I am a beginner in smalltalk,so i have some
> difficulty in understanding the code.
> I have tried it but i could not reach until SpecWrapper.
> The container that i acheived was Scrollwrapper.
> so i would like to request u to be a hand in this crisis.
> TIA
> ++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++
> +++++
>
>
> I solved the same problem in generic way. You need several methods. It
> works for me, hope that it will help you too.
>
>
> ****************************************
***********************************
> VisualPart>>widgetName
> "Returnes a widget name (ID)spec referenced by my container. This method
> actualy searches up to hierarchy until it comes to SpecWrapper tp
> returne spec name of wrapped widget"
> "010926 SP - Created"
>
> ^self spec
> ifNotNil: [:referencedSpec |
> referencedSpec name]
> ****************************************
***********************************
> VisualPart>>spec
> "Returnes a widget spec referenced by my container. This method actualy
> searches up to hierarchy until it comes to SpecWrapper tp returne spec
> of wrapped widget"
> "010926 SP - Created"
>
> ^self container
> ifNotNil: [:visualPart | visualPart spec]
>
> ****************************************
***********************************
> Controller>>widgetName
> "Read doc in widgetName method in VisualPart class"
> "011012 SP - Created"
>
> ^self view widgetName.
>
>
>
> ****************************************
***********************************
>
>
>
>
> using
>
>
> visualWorks
>
>
>
>
| |
| Sasa Prokic 2005-10-07, 7:03 pm |
| Perhaps this method was missing
spec
"Read doc in spec method in VisualPart class"
"011012 SP - Created"
^self view spec
Sreenath G K wrote:
> Hi,
>
> Thank you so much for the reply.I am a beginner in smalltalk,so i have some
> difficulty in understanding the code.
> I have tried it but i could not reach until SpecWrapper.
> The container that i acheived was Scrollwrapper.
> so i would like to request u to be a hand in this crisis.
> TIA
> ++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++
> +++++
>
>
> I solved the same problem in generic way. You need several methods. It
> works for me, hope that it will help you too.
>
>
> ****************************************
***********************************
> VisualPart>>widgetName
> "Returnes a widget name (ID)spec referenced by my container. This method
> actualy searches up to hierarchy until it comes to SpecWrapper tp
> returne spec name of wrapped widget"
> "010926 SP - Created"
>
> ^self spec
> ifNotNil: [:referencedSpec |
> referencedSpec name]
> ****************************************
***********************************
> VisualPart>>spec
> "Returnes a widget spec referenced by my container. This method actualy
> searches up to hierarchy until it comes to SpecWrapper tp returne spec
> of wrapped widget"
> "010926 SP - Created"
>
> ^self container
> ifNotNil: [:visualPart | visualPart spec]
>
> ****************************************
***********************************
> Controller>>widgetName
> "Read doc in widgetName method in VisualPart class"
> "011012 SP - Created"
>
> ^self view widgetName.
>
>
>
> ****************************************
***********************************
>
>
>
>
> using
>
>
> visualWorks
>
>
>
>
|
|
|
|