Thread View: comp.sys.amiga.tech
1 messages
1 total messages
Started by Edgar LeBel
Thu, 15 Jun 2023 17:38
Re: Locking & forbiding
Author: Edgar LeBel
Date: Thu, 15 Jun 2023 17:38
Date: Thu, 15 Jun 2023 17:38
51 lines
2850 bytes
2850 bytes
In article <1aY.02kv33t701@amdahl.uts.amdahl.com> dwl10@amdahl.uts.amdahl.com (Dave Lowrey) writes: >In article <108749@sun.Eng.Sun.COM> cmcmanis@sun.UUCP (Chuck McManis) writes: >>I wrote : >>>Why don't you use SetWindowTitle()? >> >>In article <d2YG02GD32Hm01@amdahl.uts.amdahl.com> (Dave Lowrey) writes: >>>I need to get the address of the current title, as well as >>>setting a new title. >>> >>>So I guess I am asking if it is safe to access this info >>>without any locking. >> >>Hmmmm, why do I get the feeling that you aren't doing something that >>one my consider "normal" programming practice? :-) > >That's why I am asking these questions. I would like to remain >"normal" (Whatever that means). :-) > >> >>So to be completely blunt and open about this : >> >> You opened a window, so you have a pointer to the window... > >You assume wrong. The "shell" has opened the window, so I don't >own it. > >The program I am writing puts the Current Directory into the >title bar. It works now, without ANY locking, but I suspect that >I am inviting trouble by not preventing other processes from accessing >the data. > >-- >"What is another word | Dave Lowrey | [The opinions expressed MAY be > for 'Thesaurus'?" | Amdahl Corp. | those of the author and are not > | Houston, Texas | necessarily those of his > Steven Wright | amdahl!dwl10 | employer] (`nuff said!) In my own shell I have the current directory in the title bar, which I obtained "normally" without any locking. Just send an ACTION_DISK_INFO packet to intuition and get the window structure pointer from the id_VolumeNode field of the InfoData structure in the reply. I got this method from Chris Siebenman (thanks Chris) and it's been working for two years. If you would like a code fragment, send me mail. -- Hobie Orris impersonating Edgar Lebel edgar@csri.utoronto.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads