Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 5 participants
- 144618 messages
Re: [Pharo-project] UseOldNetwork possible workaround Was: Re: Bug in NetNameResolver on PharoCore 10508?
by Levente Uzonyi
On Thu, 28 Jan 2010, Mariano Martinez Peck wrote:
> Thanks Miguel. I tried but here in the residence I have a proxy to with user
> and password. To use Monticello or whatever, I always need to evaluate this:
>
> HTTPSocket useProxyServerNamed: '10.100.1.4' port: 9090
> proxyUser: 'XXX' password: 'YYY'
>
> or
>
> HTTPSocket proxyUser: 'XXX' password: 'YYY'.
>
>
> The problem is that with NetNameResolver I cannot get trough the proxy. Do
If you only have an HTTP proxy, DNS won't work (but you don't really need
that, because the proxy will resolve the domain names). So that's normal.
Levente
> someone know how can I set the username and password so that to use
> NetNameResolver?
>
> Sorry, I tried to test it ;)
>
> Mariano
>
> On Thu, Jan 28, 2010 at 6:38 PM, Stéphane Ducasse <stephane.ducasse(a)inria.fr
>> wrote:
>
>> Really thanks for all your energy on that.
>> I have some administrative taks to do now but I will give a try just after.
>>
>> On Jan 28, 2010, at 6:06 PM, Miguel Enrique Cobá Martinez wrote:
>>
>>>
>>>> From Socket class >> initializeNetwork:
>>>
>>> "Initialize the network drivers and the NetNameResolver. Do nothing
>> if
>>> the network is already initialized."
>>> "Note: The network must be re-initialized every time Squeak starts
>> up,
>>> so applications that persist across snapshots should be prepared to
>>> re-initialize the network as needed. Such applications should call
>>> 'Socket initializeNetwork' before every network transaction. "
>>>
>>> NetNameResolver initializeNetwork
>>>
>>> This explains why the initializeNetwork must be called *before* every
>>> network transaction. Between image restarts the network isn't guaranteed
>>> to remain.
>>>
>>> I propose to create a new preference (I know that they are banned but we
>>> need a workaround for 1.0 release) and then each user can, without
>>> modify the NetNameResolver class >>initializeNetwork, change the setting
>>> to the value that works for him/her.
>>>
>>> First evaluate:
>>>
>>> Preferences addPreference: #useOldNetwork categories:
>>> #(general network)
>>> default: false balloonHelp: 'Enable/disable the use of the old
>>> network code in making network connections. You need to save and restart
>>> the image to this preference to take effect'
>>> projectLocal: false changeInformee: nil changeSelector: nil.
>>>
>>> to create the preference in a PharoCore 10508 image.
>>>
>>> Then load
>>>
>>> Network-Kernel-MiguelCoba.22
>>>
>>> from PharoInbox.
>>>
>>> Pay attention that when you change the preference, it is not refected
>>> immediately. You need to:
>>>
>>> 1. Open the image with the wrong value of the Preference
>>> 2. Change the preference
>>> Preferences enable: #useOldNetwork
>>>
>>> or
>>>
>>> Preferences disable: #useOldNetwork
>>> 3. Save the image
>>> 4. Restart the saved image
>>> 5. Evaluate:
>>> NetNameResolver initializeNetwork
>>>
>>> or some way use the network (open a monticello browser for example, so
>>> that initializeNetwork is called)
>>>
>>> 6. Test that the preference is being used:
>>>
>>> NetNameResolver useOldNetwork -> value of preference
>>>
>>> 7. Test that resolves correctly an address:
>>>
>>> NetNameResolver addressForName: 'www.yahoo.com' ->
>>> 209.131.36.158(f1.www.vip.sp1.yahoo.com),0(0)
>>>
>>> 8. Save the new image, now with the new preference.
>>>
>>> I added this workaround as a fix to issue 1884 and changed status to
>>> fixed.
>>>
>>> Can you give it a try please and if so, generate a new image for
>>> PharoCore?
>>>
>>> Cheers
>>> --
>>> Miguel Cobá
>>> http://miguel.leugim.com.mx
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
Jan. 28, 2010
Re: [Pharo-project] UseOldNetwork possible workaround Was: Re: Bug in NetNameResolver on PharoCore 10508?
by Stéphane Ducasse
> Thanks Miguel. I tried but here in the residence I have a proxy to with user and password. To use Monticello or whatever, I always need to evaluate this:
>
> HTTPSocket useProxyServerNamed: '10.100.1.4' port: 9090
> proxyUser: 'XXX' password: 'YYY'
>
> or
>
> HTTPSocket proxyUser: 'XXX' password: 'YYY'.
>
>
> The problem is that with NetNameResolver I cannot get trough the proxy. Do someone know how can I set the username and password so that to use NetNameResolver?
>
> Sorry, I tried to test it ;)
mariano did you check the entry torsten just posted
http://code.google.com/p/pharo/issues/detail?id=1888
Stef
>
> Mariano
>
> On Thu, Jan 28, 2010 at 6:38 PM, Stéphane Ducasse <stephane.ducasse(a)inria.fr> wrote:
> Really thanks for all your energy on that.
> I have some administrative taks to do now but I will give a try just after.
>
> On Jan 28, 2010, at 6:06 PM, Miguel Enrique Cobá Martinez wrote:
>
> >
> >> From Socket class >> initializeNetwork:
> >
> > "Initialize the network drivers and the NetNameResolver. Do nothing if
> > the network is already initialized."
> > "Note: The network must be re-initialized every time Squeak starts up,
> > so applications that persist across snapshots should be prepared to
> > re-initialize the network as needed. Such applications should call
> > 'Socket initializeNetwork' before every network transaction. "
> >
> > NetNameResolver initializeNetwork
> >
> > This explains why the initializeNetwork must be called *before* every
> > network transaction. Between image restarts the network isn't guaranteed
> > to remain.
> >
> > I propose to create a new preference (I know that they are banned but we
> > need a workaround for 1.0 release) and then each user can, without
> > modify the NetNameResolver class >>initializeNetwork, change the setting
> > to the value that works for him/her.
> >
> > First evaluate:
> >
> > Preferences addPreference: #useOldNetwork categories:
> > #(general network)
> > default: false balloonHelp: 'Enable/disable the use of the old
> > network code in making network connections. You need to save and restart
> > the image to this preference to take effect'
> > projectLocal: false changeInformee: nil changeSelector: nil.
> >
> > to create the preference in a PharoCore 10508 image.
> >
> > Then load
> >
> > Network-Kernel-MiguelCoba.22
> >
> > from PharoInbox.
> >
> > Pay attention that when you change the preference, it is not refected
> > immediately. You need to:
> >
> > 1. Open the image with the wrong value of the Preference
> > 2. Change the preference
> > Preferences enable: #useOldNetwork
> >
> > or
> >
> > Preferences disable: #useOldNetwork
> > 3. Save the image
> > 4. Restart the saved image
> > 5. Evaluate:
> > NetNameResolver initializeNetwork
> >
> > or some way use the network (open a monticello browser for example, so
> > that initializeNetwork is called)
> >
> > 6. Test that the preference is being used:
> >
> > NetNameResolver useOldNetwork -> value of preference
> >
> > 7. Test that resolves correctly an address:
> >
> > NetNameResolver addressForName: 'www.yahoo.com' ->
> > 209.131.36.158(f1.www.vip.sp1.yahoo.com),0(0)
> >
> > 8. Save the new image, now with the new preference.
> >
> > I added this workaround as a fix to issue 1884 and changed status to
> > fixed.
> >
> > Can you give it a try please and if so, generate a new image for
> > PharoCore?
> >
> > Cheers
> > --
> > Miguel Cobá
> > http://miguel.leugim.com.mx
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Jan. 28, 2010
Re: [Pharo-project] UseOldNetwork possible workaround Was: Re: Bug in NetNameResolver on PharoCore 10508?
by Mariano Martinez Peck
Thanks Miguel. I tried but here in the residence I have a proxy to with user
and password. To use Monticello or whatever, I always need to evaluate this:
HTTPSocket useProxyServerNamed: '10.100.1.4' port: 9090
proxyUser: 'XXX' password: 'YYY'
or
HTTPSocket proxyUser: 'XXX' password: 'YYY'.
The problem is that with NetNameResolver I cannot get trough the proxy. Do
someone know how can I set the username and password so that to use
NetNameResolver?
Sorry, I tried to test it ;)
Mariano
On Thu, Jan 28, 2010 at 6:38 PM, Stéphane Ducasse <stephane.ducasse(a)inria.fr
> wrote:
> Really thanks for all your energy on that.
> I have some administrative taks to do now but I will give a try just after.
>
> On Jan 28, 2010, at 6:06 PM, Miguel Enrique Cobá Martinez wrote:
>
> >
> >> From Socket class >> initializeNetwork:
> >
> > "Initialize the network drivers and the NetNameResolver. Do nothing
> if
> > the network is already initialized."
> > "Note: The network must be re-initialized every time Squeak starts
> up,
> > so applications that persist across snapshots should be prepared to
> > re-initialize the network as needed. Such applications should call
> > 'Socket initializeNetwork' before every network transaction. "
> >
> > NetNameResolver initializeNetwork
> >
> > This explains why the initializeNetwork must be called *before* every
> > network transaction. Between image restarts the network isn't guaranteed
> > to remain.
> >
> > I propose to create a new preference (I know that they are banned but we
> > need a workaround for 1.0 release) and then each user can, without
> > modify the NetNameResolver class >>initializeNetwork, change the setting
> > to the value that works for him/her.
> >
> > First evaluate:
> >
> > Preferences addPreference: #useOldNetwork categories:
> > #(general network)
> > default: false balloonHelp: 'Enable/disable the use of the old
> > network code in making network connections. You need to save and restart
> > the image to this preference to take effect'
> > projectLocal: false changeInformee: nil changeSelector: nil.
> >
> > to create the preference in a PharoCore 10508 image.
> >
> > Then load
> >
> > Network-Kernel-MiguelCoba.22
> >
> > from PharoInbox.
> >
> > Pay attention that when you change the preference, it is not refected
> > immediately. You need to:
> >
> > 1. Open the image with the wrong value of the Preference
> > 2. Change the preference
> > Preferences enable: #useOldNetwork
> >
> > or
> >
> > Preferences disable: #useOldNetwork
> > 3. Save the image
> > 4. Restart the saved image
> > 5. Evaluate:
> > NetNameResolver initializeNetwork
> >
> > or some way use the network (open a monticello browser for example, so
> > that initializeNetwork is called)
> >
> > 6. Test that the preference is being used:
> >
> > NetNameResolver useOldNetwork -> value of preference
> >
> > 7. Test that resolves correctly an address:
> >
> > NetNameResolver addressForName: 'www.yahoo.com' ->
> > 209.131.36.158(f1.www.vip.sp1.yahoo.com),0(0)
> >
> > 8. Save the new image, now with the new preference.
> >
> > I added this workaround as a fix to issue 1884 and changed status to
> > fixed.
> >
> > Can you give it a try please and if so, generate a new image for
> > PharoCore?
> >
> > Cheers
> > --
> > Miguel Cobá
> > http://miguel.leugim.com.mx
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
Jan. 28, 2010
Re: [Pharo-project] UseOldNetwork possible workaround Was: Re: Bug in NetNameResolver on PharoCore 10508?
by Stéphane Ducasse
Really thanks for all your energy on that.
I have some administrative taks to do now but I will give a try just after.
On Jan 28, 2010, at 6:06 PM, Miguel Enrique Cobá Martinez wrote:
>
>> From Socket class >> initializeNetwork:
>
> "Initialize the network drivers and the NetNameResolver. Do nothing if
> the network is already initialized."
> "Note: The network must be re-initialized every time Squeak starts up,
> so applications that persist across snapshots should be prepared to
> re-initialize the network as needed. Such applications should call
> 'Socket initializeNetwork' before every network transaction. "
>
> NetNameResolver initializeNetwork
>
> This explains why the initializeNetwork must be called *before* every
> network transaction. Between image restarts the network isn't guaranteed
> to remain.
>
> I propose to create a new preference (I know that they are banned but we
> need a workaround for 1.0 release) and then each user can, without
> modify the NetNameResolver class >>initializeNetwork, change the setting
> to the value that works for him/her.
>
> First evaluate:
>
> Preferences addPreference: #useOldNetwork categories:
> #(general network)
> default: false balloonHelp: 'Enable/disable the use of the old
> network code in making network connections. You need to save and restart
> the image to this preference to take effect'
> projectLocal: false changeInformee: nil changeSelector: nil.
>
> to create the preference in a PharoCore 10508 image.
>
> Then load
>
> Network-Kernel-MiguelCoba.22
>
> from PharoInbox.
>
> Pay attention that when you change the preference, it is not refected
> immediately. You need to:
>
> 1. Open the image with the wrong value of the Preference
> 2. Change the preference
> Preferences enable: #useOldNetwork
>
> or
>
> Preferences disable: #useOldNetwork
> 3. Save the image
> 4. Restart the saved image
> 5. Evaluate:
> NetNameResolver initializeNetwork
>
> or some way use the network (open a monticello browser for example, so
> that initializeNetwork is called)
>
> 6. Test that the preference is being used:
>
> NetNameResolver useOldNetwork -> value of preference
>
> 7. Test that resolves correctly an address:
>
> NetNameResolver addressForName: 'www.yahoo.com' ->
> 209.131.36.158(f1.www.vip.sp1.yahoo.com),0(0)
>
> 8. Save the new image, now with the new preference.
>
> I added this workaround as a fix to issue 1884 and changed status to
> fixed.
>
> Can you give it a try please and if so, generate a new image for
> PharoCore?
>
> Cheers
> --
> Miguel Cobá
> http://miguel.leugim.com.mx
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Jan. 28, 2010
[Pharo-project] UseOldNetwork possible workaround Was: Re: Bug in NetNameResolver on PharoCore 10508?
by Miguel Enrique Cobá Martinez
>From Socket class >> initializeNetwork:
"Initialize the network drivers and the NetNameResolver. Do nothing if
the network is already initialized."
"Note: The network must be re-initialized every time Squeak starts up,
so applications that persist across snapshots should be prepared to
re-initialize the network as needed. Such applications should call
'Socket initializeNetwork' before every network transaction. "
NetNameResolver initializeNetwork
This explains why the initializeNetwork must be called *before* every
network transaction. Between image restarts the network isn't guaranteed
to remain.
I propose to create a new preference (I know that they are banned but we
need a workaround for 1.0 release) and then each user can, without
modify the NetNameResolver class >>initializeNetwork, change the setting
to the value that works for him/her.
First evaluate:
Preferences addPreference: #useOldNetwork categories:
#(general network)
default: false balloonHelp: 'Enable/disable the use of the old
network code in making network connections. You need to save and restart
the image to this preference to take effect'
projectLocal: false changeInformee: nil changeSelector: nil.
to create the preference in a PharoCore 10508 image.
Then load
Network-Kernel-MiguelCoba.22
from PharoInbox.
Pay attention that when you change the preference, it is not refected
immediately. You need to:
1. Open the image with the wrong value of the Preference
2. Change the preference
Preferences enable: #useOldNetwork
or
Preferences disable: #useOldNetwork
3. Save the image
4. Restart the saved image
5. Evaluate:
NetNameResolver initializeNetwork
or some way use the network (open a monticello browser for example, so
that initializeNetwork is called)
6. Test that the preference is being used:
NetNameResolver useOldNetwork -> value of preference
7. Test that resolves correctly an address:
NetNameResolver addressForName: 'www.yahoo.com' ->
209.131.36.158(f1.www.vip.sp1.yahoo.com),0(0)
8. Save the new image, now with the new preference.
I added this workaround as a fix to issue 1884 and changed status to
fixed.
Can you give it a try please and if so, generate a new image for
PharoCore?
Cheers
--
Miguel Cobá
http://miguel.leugim.com.mx
Jan. 28, 2010
Re: [Pharo-project] Bug in NetNameResolver on PharoCore 10508?
by Stéphane Ducasse
+1
>> Yes, I know that the code is very difficult to understand, mainly
> because of the primitives. They brake the understanding you have so far
> when you have to switch to c code with a lot of pointers/structs/string
> buffers.
>
> The problem here is that, now it is impossible to change the networks
> subsystem of Pharo (or squeak). As Mariano said, we *need* to release
> 1.0 and this bug can be a show stopper.
>
> Also, with due respect to the original coders of the network subsystem,
> the code is really convoluted (I know that networking isn't simple), at
> least to understand the fully implication of a "simple" change like
> this. It is not a well factored code. It mixes GUI prompts, IPv4, IPv6,
> primitives and smalltalk code. So I think that is difficult to have
> someone with the enough knowledge to change the code so that it works
> for now. But that is how things are now. Maybe our own ignorance of the
> code is what negates us a fix, but we need to left that apart and work a
> solution for the *particular* problem in hand. For 1.1 we can discuss
> new implementation if that is required.
>
> As Adrian said, there are users that need useOldNetwork true and some
> others that need useOldNetwork to false. The problem is that we don't
> fully understand the consequences of both changes.
>
> So, people, we need your help. Those who are most familiar with the
> network code, please, please, take a look and suggest a solution for the
> 1.0 release. *No* full rewrites, no throw code, no blaming, just a
> working workaround for this.
>
> Regards
>
> Miguel Coba
>
> --
> Miguel Cobá
> http://miguel.leugim.com.mx
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Jan. 28, 2010
Re: [Pharo-project] [ANN] Video Course on Smalltalk
by Davide Varvello
Probably Q1 2010.
Davide
Geert Claes wrote:
>
> Yep, do let us know when the English version is available!
>
--
View this message in context: http://n4.nabble.com/ANN-Video-Course-on-Smalltalk-tp1294842p1387242.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Jan. 28, 2010
Re: [Pharo-project] Behaviour of the FileDialogWindow (Was: How doIsave the contents of a Workspace?)
by Gary Chambers
Feel free... we have a backlog of UnitTest stuff to do... though not covering "UI" things yet, in general (would be nice to have a UI driver for tests...)
Regards, Gary
----- Original Message -----
From: Mariano Martinez Peck
To: Pharo-project(a)lists.gforge.inria.fr
Sent: Thursday, January 28, 2010 4:26 PM
Subject: Re: [Pharo-project] Behaviour of the FileDialogWindow (Was: How doIsave the contents of a Workspace?)
Perhaps you could describe a set of scenarios for what kind of return(s) you
would like, taking into account the many possible outcomes (path/file does
not exist, require new file, require existing file etc.)
Someone here is shouting "Unit Tests!!!!"
Regards, Gary
----- Original Message -----
From: "George Herolyants" <george.herolyants(a)gmail.com>
To: <Pharo-project(a)lists.gforge.inria.fr>
Sent: Tuesday, January 26, 2010 8:46 AM
Subject: [Pharo-project] Behaviour of the FileDialogWindow (Was: How do
Isave the contents of a Workspace?)
> 2010/1/25 Schwab,Wilhelm K <bschwab(a)anest.ufl.edu>:
>> Gary,
>>
>> IMHO, the correct result is the file name. First, Squeak's streams are,
>> how do I put this nicely... Second, there are some plaform dependencies
>> re ownership. Finally, somebody might want to try Nile.
>>
>> Bill
>>
>
> Exactly! Another use case might be when I just don't want to save a
> file immediately. So, I agree with Bill, the correct behaviour for the
> FileDialogWindow is to return the full file name and let its user do
> what it want.
>
> The same for the opening of a file. Maybe even these cases can be
> merged into the one.
>
>>
>> -----Original Message-----
>> From: pharo-project-bounces(a)lists.gforge.inria.fr
>> [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Gary
>> Chambers
>> Sent: Monday, January 25, 2010 9:57 AM
>> To: Pharo-project(a)lists.gforge.inria.fr
>> Subject: Re: [Pharo-project] [newbee] How do I save the
>> contentsofaWorkspace?
>>
>> Actually rather more complicated than that...
>> You'll want the full path I expect, also the correct OK button
>> enablement...
>>
>> Any reason not to have the FileStream?
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Gary Chambers" <gazzaguru2(a)btinternet.com>
>> To: <Pharo-project(a)lists.gforge.inria.fr>
>> Sent: Monday, January 25, 2010 2:50 PM
>> Subject: Re: [Pharo-project] [newbee] How do I save the
>> contentsofaWorkspace?
>>
>>
>>> Not at present.
>>> Have a look at FileDialogWindow.
>>> Perhaps you could add a couple of methods...
>>>
>>> saveSelectedFile
>>> "Answer the name of the selected file or new filename or nil if blank."
>>>
>>> |d f|
>>> d := self selectedFileDirectory ifNil: [^nil].
>>> f := self selectedFileName ifNil: [self fileNameText withBlanksTrimmed].
>>> ^f ifEmpty: [nil].
>>>
>>> answerSaveFileName
>>> "Set the receiver to answer the selected/entered file name."
>>>
>>> self actionSelector: #saveSelectedFileName.
>>> self changed: #okEnabled
>>>
>>>
>>> Then, to open one...
>>>
>>> |fd|
>>> fd := FileDialogWindow new
>>> title: title;
>>> answerSaveFileName.
>>> ^(modalParentMorph openModal: fd) answer
>>>
>>> Choosing an appropriate modal owner.
>>> If you want, you could add the convenience methods to TEasilyThemed
>>> also...
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "George Herolyants" <george.herolyants(a)gmail.com>
>>> To: <Pharo-project(a)lists.gforge.inria.fr>
>>> Sent: Monday, January 25, 2010 12:37 PM
>>> Subject: Re: [Pharo-project] [newbee] How do I save the contents
>>> ofaWorkspace?
>>>
>>>
>>>> 2010/1/25 Gary Chambers <gazzaguru2(a)btinternet.com>:
>>>>> The base UIManager code has no accessors for file saving, though
>>>>> Polymorph does support such a dialog...
>>>>>
>>>>> Try
>>>>>
>>>>> UITheme builder fileSave: "Your dialog title here'
>>>>
>>>> Thanks Gary! But is there a way to force this dialog to return just
>>>> file name and not to create a file stream?
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
Pharo-project(a)lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
------------------------------------------------------------------------------
_______________________________________________
Pharo-project mailing list
Pharo-project(a)lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Jan. 28, 2010
Re: [Pharo-project] Behaviour of the FileDialogWindow (Was: How do Isave the contents of a Workspace?)
by Mariano Martinez Peck
>
> Perhaps you could describe a set of scenarios for what kind of return(s)
> you
> would like, taking into account the many possible outcomes (path/file does
> not exist, require new file, require existing file etc.)
>
Someone here is shouting "Unit Tests!!!!"
>
> Regards, Gary
>
> ----- Original Message -----
> From: "George Herolyants" <george.herolyants(a)gmail.com>
> To: <Pharo-project(a)lists.gforge.inria.fr>
> Sent: Tuesday, January 26, 2010 8:46 AM
> Subject: [Pharo-project] Behaviour of the FileDialogWindow (Was: How do
> Isave the contents of a Workspace?)
>
>
> > 2010/1/25 Schwab,Wilhelm K <bschwab(a)anest.ufl.edu>:
> >> Gary,
> >>
> >> IMHO, the correct result is the file name. First, Squeak's streams are,
> >> how do I put this nicely... Second, there are some plaform dependencies
> >> re ownership. Finally, somebody might want to try Nile.
> >>
> >> Bill
> >>
> >
> > Exactly! Another use case might be when I just don't want to save a
> > file immediately. So, I agree with Bill, the correct behaviour for the
> > FileDialogWindow is to return the full file name and let its user do
> > what it want.
> >
> > The same for the opening of a file. Maybe even these cases can be
> > merged into the one.
> >
> >>
> >> -----Original Message-----
> >> From: pharo-project-bounces(a)lists.gforge.inria.fr
> >> [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Gary
> >> Chambers
> >> Sent: Monday, January 25, 2010 9:57 AM
> >> To: Pharo-project(a)lists.gforge.inria.fr
> >> Subject: Re: [Pharo-project] [newbee] How do I save the
> >> contentsofaWorkspace?
> >>
> >> Actually rather more complicated than that...
> >> You'll want the full path I expect, also the correct OK button
> >> enablement...
> >>
> >> Any reason not to have the FileStream?
> >>
> >> Regards, Gary
> >>
> >> ----- Original Message -----
> >> From: "Gary Chambers" <gazzaguru2(a)btinternet.com>
> >> To: <Pharo-project(a)lists.gforge.inria.fr>
> >> Sent: Monday, January 25, 2010 2:50 PM
> >> Subject: Re: [Pharo-project] [newbee] How do I save the
> >> contentsofaWorkspace?
> >>
> >>
> >>> Not at present.
> >>> Have a look at FileDialogWindow.
> >>> Perhaps you could add a couple of methods...
> >>>
> >>> saveSelectedFile
> >>> "Answer the name of the selected file or new filename or nil if blank."
> >>>
> >>> |d f|
> >>> d := self selectedFileDirectory ifNil: [^nil].
> >>> f := self selectedFileName ifNil: [self fileNameText
> withBlanksTrimmed].
> >>> ^f ifEmpty: [nil].
> >>>
> >>> answerSaveFileName
> >>> "Set the receiver to answer the selected/entered file name."
> >>>
> >>> self actionSelector: #saveSelectedFileName.
> >>> self changed: #okEnabled
> >>>
> >>>
> >>> Then, to open one...
> >>>
> >>> |fd|
> >>> fd := FileDialogWindow new
> >>> title: title;
> >>> answerSaveFileName.
> >>> ^(modalParentMorph openModal: fd) answer
> >>>
> >>> Choosing an appropriate modal owner.
> >>> If you want, you could add the convenience methods to TEasilyThemed
> >>> also...
> >>>
> >>> Regards, Gary
> >>>
> >>> ----- Original Message -----
> >>> From: "George Herolyants" <george.herolyants(a)gmail.com>
> >>> To: <Pharo-project(a)lists.gforge.inria.fr>
> >>> Sent: Monday, January 25, 2010 12:37 PM
> >>> Subject: Re: [Pharo-project] [newbee] How do I save the contents
> >>> ofaWorkspace?
> >>>
> >>>
> >>>> 2010/1/25 Gary Chambers <gazzaguru2(a)btinternet.com>:
> >>>>> The base UIManager code has no accessors for file saving, though
> >>>>> Polymorph does support such a dialog...
> >>>>>
> >>>>> Try
> >>>>>
> >>>>> UITheme builder fileSave: "Your dialog title here'
> >>>>
> >>>> Thanks Gary! But is there a way to force this dialog to return just
> >>>> file name and not to create a file stream?
> >>>>
> >>>> _______________________________________________
> >>>> Pharo-project mailing list
> >>>> Pharo-project(a)lists.gforge.inria.fr
> >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>
> >>>
> >>> _______________________________________________
> >>> Pharo-project mailing list
> >>> Pharo-project(a)lists.gforge.inria.fr
> >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> Pharo-project(a)lists.gforge.inria.fr
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> Pharo-project(a)lists.gforge.inria.fr
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
Jan. 28, 2010
Re: [Pharo-project] Behaviour of the FileDialogWindow (Was: How do Isave the contents of a Workspace?)
by Gary Chambers
Added to "wish list" also...
The primary reason for returning streams was to simplify the "end user" code
handling though...
No great problem to support both styles of access.
Perhaps you could describe a set of scenarios for what kind of return(s) you
would like, taking into account the many possible outcomes (path/file does
not exist, require new file, require existing file etc.)
Regards, Gary
----- Original Message -----
From: "George Herolyants" <george.herolyants(a)gmail.com>
To: <Pharo-project(a)lists.gforge.inria.fr>
Sent: Tuesday, January 26, 2010 8:46 AM
Subject: [Pharo-project] Behaviour of the FileDialogWindow (Was: How do
Isave the contents of a Workspace?)
> 2010/1/25 Schwab,Wilhelm K <bschwab(a)anest.ufl.edu>:
>> Gary,
>>
>> IMHO, the correct result is the file name. First, Squeak's streams are,
>> how do I put this nicely... Second, there are some plaform dependencies
>> re ownership. Finally, somebody might want to try Nile.
>>
>> Bill
>>
>
> Exactly! Another use case might be when I just don't want to save a
> file immediately. So, I agree with Bill, the correct behaviour for the
> FileDialogWindow is to return the full file name and let its user do
> what it want.
>
> The same for the opening of a file. Maybe even these cases can be
> merged into the one.
>
>>
>> -----Original Message-----
>> From: pharo-project-bounces(a)lists.gforge.inria.fr
>> [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Gary
>> Chambers
>> Sent: Monday, January 25, 2010 9:57 AM
>> To: Pharo-project(a)lists.gforge.inria.fr
>> Subject: Re: [Pharo-project] [newbee] How do I save the
>> contentsofaWorkspace?
>>
>> Actually rather more complicated than that...
>> You'll want the full path I expect, also the correct OK button
>> enablement...
>>
>> Any reason not to have the FileStream?
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Gary Chambers" <gazzaguru2(a)btinternet.com>
>> To: <Pharo-project(a)lists.gforge.inria.fr>
>> Sent: Monday, January 25, 2010 2:50 PM
>> Subject: Re: [Pharo-project] [newbee] How do I save the
>> contentsofaWorkspace?
>>
>>
>>> Not at present.
>>> Have a look at FileDialogWindow.
>>> Perhaps you could add a couple of methods...
>>>
>>> saveSelectedFile
>>> "Answer the name of the selected file or new filename or nil if blank."
>>>
>>> |d f|
>>> d := self selectedFileDirectory ifNil: [^nil].
>>> f := self selectedFileName ifNil: [self fileNameText withBlanksTrimmed].
>>> ^f ifEmpty: [nil].
>>>
>>> answerSaveFileName
>>> "Set the receiver to answer the selected/entered file name."
>>>
>>> self actionSelector: #saveSelectedFileName.
>>> self changed: #okEnabled
>>>
>>>
>>> Then, to open one...
>>>
>>> |fd|
>>> fd := FileDialogWindow new
>>> title: title;
>>> answerSaveFileName.
>>> ^(modalParentMorph openModal: fd) answer
>>>
>>> Choosing an appropriate modal owner.
>>> If you want, you could add the convenience methods to TEasilyThemed
>>> also...
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "George Herolyants" <george.herolyants(a)gmail.com>
>>> To: <Pharo-project(a)lists.gforge.inria.fr>
>>> Sent: Monday, January 25, 2010 12:37 PM
>>> Subject: Re: [Pharo-project] [newbee] How do I save the contents
>>> ofaWorkspace?
>>>
>>>
>>>> 2010/1/25 Gary Chambers <gazzaguru2(a)btinternet.com>:
>>>>> The base UIManager code has no accessors for file saving, though
>>>>> Polymorph does support such a dialog...
>>>>>
>>>>> Try
>>>>>
>>>>> UITheme builder fileSave: "Your dialog title here'
>>>>
>>>> Thanks Gary! But is there a way to force this dialog to return just
>>>> file name and not to create a file stream?
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Jan. 28, 2010