Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-30 Thread kmo
You need to do two things. Firstly, you need to create a label. Secondly, you need to add it to the layout. The first bit is easy. You create the label in the initializePresenters method just like you did the button and the text field. There's a method that creates a label. If you open a system

Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-30 Thread shawon58
Hello KMO i solve that issue but can you help me one thing. i want to add a label infront of text field. Can you tell me how to do that, in code where i need to change ? Thanks kmo wrote > This code should give you a clue of how to do what you

Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-30 Thread Ben Coman
On Wed, 29 Jul 2020 at 23:57, kmo wrote: > > Let's see: 'a.bat 10' works but 'a.bat', myTextField asString does NOT work. > There's clearly something wrong with 'a.bat', myTextField asString - but > what? As Tim says, you have to investigate. > > Tim has suggested a couple of ways you could

Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-29 Thread kmo
Let's see: 'a.bat 10' works but 'a.bat', myTextField asString does NOT work. There's clearly something wrong with 'a.bat', myTextField asString - but what? As Tim says, you have to investigate. Tim has suggested a couple of ways you could investigate. Here's another - You have my code that

Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-29 Thread Tim Mackinnon
Hi - you will get the most benefit by working through the problem yourself which is why folks are hesitant to “do it for you”, as you won’t learn meaningfully that way. Have you tried putting a break point in the code and using the debugger? (You can use the code “self halt.” If you can’t

Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-28 Thread shawon58
Hello KMO i follow your step one by one and make the form but i want to run : connectPresenters myButton whenActivatedDo: [LibC system: 'a.bat', myTextField asString]. That means when i put any value in text field than press click me than that value need to send to my bat file as string. so i

Re: [Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-28 Thread kmo
This code should give you a clue of how to do what you want. You can file it in or type it in yourself. You can run it from the playground with the command - SimpleExample new openWithSpec. How it works - You need to subclass SpPresenter. You need to set up an instance method called

[Pharo-users] Want to create a text Field using SPEC2 to get Value from User

2020-07-28 Thread shawon58
Hello Is there anyone who have idea how to create a textinputfield in spec2/GUI in pharo and get the value from that text field. Cause i want to use LibC fuction to send the text field data to a BAT file. So need help to create a simple textfield that can get the value. I need guide line badly.