Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

"It's God. No, not Richard Stallman, or Linus Torvalds, but God." (By Matt Welsh)


programming / comp.lang.smalltalk.dolphin / Re: button disable?

SubjectAuthor
* button disable?john c
`* Re: button disable?vin...@gmail.com
 `* Re: button disable?john c
  `* Re: button disable?john.a...@gmail.com
   `* Re: button disable?john c
    `* Re: button disable?vin...@gmail.com
     `* Re: button disable?john c
      `* Re: button disable?vin...@gmail.com
       `* Re: button disable?john c
        `* Re: button disable?john c
         +- Re: button disable?vin...@gmail.com
         `* Re: button disable?vin...@gmail.com
          +- Re: button disable?john c
          `* Re: button disable?john c
           `- Re: button disable?john c

1
Subject: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 14 Sep 2021 18:58 UTC
X-Received: by 2002:a05:6214:ccd:: with SMTP id 13mr6828361qvx.5.1631645880964;
Tue, 14 Sep 2021 11:58:00 -0700 (PDT)
X-Received: by 2002:a9d:5548:: with SMTP id h8mr15942023oti.370.1631645880626;
Tue, 14 Sep 2021 11:58:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 14 Sep 2021 11:58:00 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
Subject: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Tue, 14 Sep 2021 18:58:00 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 38
View all headers
hi all,

i've had a problem for quite a while. i have a dialog where one button should be enabled/disabled based the values of some instance variables. i have included what i think are the relevant methods. the enable/disable is not working.

 i'm running on v7.1.20 but have had the same problem with 7.0.57.

any thoughts will be appreciated.

john


queryCommand: aCommandQuery

super queryCommand: aCommandQuery.
(self canEnableLoad)
ifTrue:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ aCommandQuery beEnabled ]]
ifFalse:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ aCommandQuery beDisabled ]].

canEnableLoad

(hasRegion)
ifFalse:[^false].
(hasFilePath )
ifFalse:[^false].
(hasFileType )
ifFalse:[^false].
canEnablePresenter value: true.
^true


openOn: aJCModel

(aJCModel isNil)
ifTrue:[self model: self class defaultModel]
ifFalse:[self model: aJCModel ].

self preOpenProcess.
self halt. <== hasRegion, hasFilePath, hasFileType are all false here
^self showModal. <== load button enabled (it is assoc with method onLoadEnabled)


Subject: Re: button disable?
From: vin...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 15 Sep 2021 04:03 UTC
References: 1
X-Received: by 2002:a05:6214:148b:: with SMTP id bn11mr8773749qvb.67.1631678592911;
Tue, 14 Sep 2021 21:03:12 -0700 (PDT)
X-Received: by 2002:a05:6808:10c1:: with SMTP id s1mr3739138ois.69.1631678592567;
Tue, 14 Sep 2021 21:03:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 14 Sep 2021 21:03:12 -0700 (PDT)
In-Reply-To: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=59.167.168.68; posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 59.167.168.68
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com>
Subject: Re: button disable?
From: vin...@gmail.com (vin...@gmail.com)
Injection-Date: Wed, 15 Sep 2021 04:03:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
View all headers
Hi John

Does the button have a command connected to it? If it does it should be enabled by default.

It is difficult to tell from you snippet the exact problem, but can you mock the call to the code in the body of the #queryCommand: method? I.e., if you call
  (self canEnableLoad)
    ifTrue:[(true) ifTrue: [ aCommandQuery beEnabled ]]
   ifFalse:[(true) ifTrue: [ aCommandQuery beDisabled ]].
does anything different happen?

Vince


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 15 Sep 2021 18:07 UTC
References: 1 2
X-Received: by 2002:a05:622a:170a:: with SMTP id h10mr1115716qtk.327.1631729234347;
Wed, 15 Sep 2021 11:07:14 -0700 (PDT)
X-Received: by 2002:a05:6808:95:: with SMTP id s21mr779032oic.80.1631729233967;
Wed, 15 Sep 2021 11:07:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 15 Sep 2021 11:07:13 -0700 (PDT)
In-Reply-To: <cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com> <cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Wed, 15 Sep 2021 18:07:14 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 30
View all headers
hi vince,

i took your suggestions (code below). bottom line is that method which sets variables and the boolean method which queryCommand reference, are working correctly. beyond that i setup queryCommand to "false" and button is still enabled.

john

queryCommand: aCommandQuery

super queryCommand: aCommandQuery.
(false "self canEnableLoad") <== should disable the button assoc with (#onLoadEnabled) ... doesn't
ifTrue:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ aCommandQuery beEnabled ]]
ifFalse:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ aCommandQuery beDisabled ]].

updateUI: aParser                                     <== method which sets instance vars which queryCommand cares about

| bool |

bool := self canEnableLoad. <== method in #queryCommand: first time in false here
self halt.
wpRegionPresenter model: (aParser fileRegion).
hasRegion := true.
wpFileTypePresenter model: (aParser fileType).
hasFileType := true.
wpFullPathPresenter model: (aParser filePath).
hasFilePath := true.
bool := self canEnableLoad. <== bool is true, so #canEnableLoad is working
self halt.
fileType :=  (aParser fileType).
fileName := (aParser filePath).
regionName :=  (aParser fileRegion).



Subject: Re: button disable?
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 07:41 UTC
References: 1 2 3
X-Received: by 2002:a0c:9146:: with SMTP id q64mr3903409qvq.38.1631778080212;
Thu, 16 Sep 2021 00:41:20 -0700 (PDT)
X-Received: by 2002:a05:6808:20e:: with SMTP id l14mr2737373oie.87.1631778079968;
Thu, 16 Sep 2021 00:41:19 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 00:41:19 -0700 (PDT)
In-Reply-To: <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.71.185; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.71.185
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com>
Subject: Re: button disable?
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Thu, 16 Sep 2021 07:41:20 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 37
View all headers
Hi John - I haven't looked in detail at this but I think you should be checking the commandSymbol of aCommandQuery, i.e.

 (#(#onLoadEnabled) includes: aCommandQuery commandSymbol) ifTrue: [ aCommandQuery beDisabled ]

Hope this helps.

John Aspinall


On Wednesday, September 15, 2021 at 7:07:14 PM UTC+1, john c wrote:
hi vince,

i took your suggestions (code below). bottom line is that method which sets variables and the boolean method which queryCommand reference, are working correctly. beyond that i setup queryCommand to "false" and button is still enabled.
john

queryCommand: aCommandQuery

super queryCommand: aCommandQuery.
(false "self canEnableLoad") <== should disable the button assoc with (#onLoadEnabled) ... doesn't
ifTrue:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ aCommandQuery beEnabled ]]
ifFalse:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ aCommandQuery beDisabled ]].
updateUI: aParser <== method which sets instance vars which queryCommand cares about

| bool |

bool := self canEnableLoad. <== method in #queryCommand: first time in false here
self halt.
wpRegionPresenter model: (aParser fileRegion).
hasRegion := true.
wpFileTypePresenter model: (aParser fileType).
hasFileType := true.
wpFullPathPresenter model: (aParser filePath).
hasFilePath := true.
bool := self canEnableLoad. <== bool is true, so #canEnableLoad is working
self halt.
fileType := (aParser fileType).
fileName := (aParser filePath).
regionName := (aParser fileRegion).


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 13:05 UTC
References: 1 2 3 4
X-Received: by 2002:a05:622a:11d0:: with SMTP id n16mr4810402qtk.297.1631797503624;
Thu, 16 Sep 2021 06:05:03 -0700 (PDT)
X-Received: by 2002:aca:ac4e:: with SMTP id v75mr3503184oie.167.1631797503297;
Thu, 16 Sep 2021 06:05:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 06:05:03 -0700 (PDT)
In-Reply-To: <b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Thu, 16 Sep 2021 13:05:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 4
View all headers
hi john,

unfortunately this didn't fix it.

john


Subject: Re: button disable?
From: vin...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 00:00 UTC
References: 1 2 3 4 5
X-Received: by 2002:a05:620a:2914:: with SMTP id m20mr7975810qkp.497.1631836850604;
Thu, 16 Sep 2021 17:00:50 -0700 (PDT)
X-Received: by 2002:a9d:5548:: with SMTP id h8mr6928514oti.370.1631836850267;
Thu, 16 Sep 2021 17:00:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 17:00:50 -0700 (PDT)
In-Reply-To: <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=59.167.168.68; posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 59.167.168.68
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com>
Subject: Re: button disable?
From: vin...@gmail.com (vin...@gmail.com)
Injection-Date: Fri, 17 Sep 2021 00:00:50 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
View all headers
Hi John

Are you able to test this and tell us what you get in the Transcript?

queryCommand: aCommandQuery
  | comm |

  comm := aCommandQuery command.
  Transcript nextPutAll: comm printString; cr

Vince


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 00:42 UTC
References: 1 2 3 4 5 6
X-Received: by 2002:ac8:4111:: with SMTP id q17mr8141280qtl.264.1631839320720;
Thu, 16 Sep 2021 17:42:00 -0700 (PDT)
X-Received: by 2002:a05:6830:70c:: with SMTP id y12mr7245801ots.19.1631839320378;
Thu, 16 Sep 2021 17:42:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 17:42:00 -0700 (PDT)
In-Reply-To: <43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Fri, 17 Sep 2021 00:42:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 41
View all headers
hi vince,

i've attached queryCommand from my problem dialog, but it doesn't produce any output.

as a side note i created a new test dialog outside of the hierarchy of my base dialog and it worked fine. so i created a completely new dialog as a sub class of my base dialog and it doesn't work. so i have to assume there is something funky in my dialog hierarchy but i have no clue where to start. i attached the queryCommand from my base dialog.




queryCommand: aCommandQuery                                               <== queryCommand from problem dialog

| comm |

super queryCommand: aCommandQuery.

comm := aCommandQuery command.
Transcript nextPutAll: 'Cmd ', comm printString, Character cr.
(false "self canEnableLoad")
ifTrue:[(#(#onLoadEnabled) includes: aCommandQuery commandSymbol) ifTrue: [ aCommandQuery beEnabled ]]
ifFalse:[(#(#onLoadEnabled) includes: aCommandQuery commandSymbol) ifTrue: [ aCommandQuery beDisabled ]].

queryCommand: aCommandQuery                                             <== from my base dialog class

super queryCommand: aCommandQuery.

(#(#cancel) includes: aCommandQuery command) ifTrue: [ aCommandQuery beEnabled ].

(self isDirty)
ifTrue:[(#(#ok) includes: aCommandQuery command) ifTrue: [ aCommandQuery beEnabled ]]
ifFalse:[(#(#ok) includes: aCommandQuery command) ifTrue: [ aCommandQuery beDisabled ]].


Subject: Re: button disable?
From: vin...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 01:02 UTC
References: 1 2 3 4 5 6 7
X-Received: by 2002:ac8:5cd0:: with SMTP id s16mr6583184qta.327.1631840563004;
Thu, 16 Sep 2021 18:02:43 -0700 (PDT)
X-Received: by 2002:a9d:7017:: with SMTP id k23mr7045472otj.320.1631840562669;
Thu, 16 Sep 2021 18:02:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 16 Sep 2021 18:02:42 -0700 (PDT)
In-Reply-To: <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=59.167.168.68; posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 59.167.168.68
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com>
Subject: Re: button disable?
From: vin...@gmail.com (vin...@gmail.com)
Injection-Date: Fri, 17 Sep 2021 01:02:42 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
View all headers
On Friday, 17 September 2021 at 10:42:01 UTC+10, john c wrote:
hi vince,

i've attached queryCommand from my problem dialog, but it doesn't produce any output.
....
queryCommand: aCommandQuery <== queryCommand from problem dialog

| comm |

super queryCommand: aCommandQuery.

comm := aCommandQuery command.
Transcript nextPutAll: 'Cmd ', comm printString, Character cr.

This won't print anything out as you need to send the message #cr to the Transcript to flush the line. You will need to do this:
Transcript nextPutAll: 'Cmd ', comm printString; cr.

Vince


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 12:26 UTC
References: 1 2 3 4 5 6 7 8
X-Received: by 2002:a05:620a:444d:: with SMTP id w13mr10197168qkp.315.1631881593163;
Fri, 17 Sep 2021 05:26:33 -0700 (PDT)
X-Received: by 2002:a9d:7017:: with SMTP id k23mr9092565otj.320.1631881592804;
Fri, 17 Sep 2021 05:26:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 05:26:32 -0700 (PDT)
In-Reply-To: <4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Fri, 17 Sep 2021 12:26:33 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
View all headers
hi vince,

sorry, missed the semi-colon.

here is transcript

Cmd #ok
Cmd #cancel
Cmd #openFindFile
Cmd #onLoadEnabled
Cmd #ok
Cmd #cancel
Cmd #openFindFile
Cmd #onLoadEnabled


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 13:20 UTC
References: 1 2 3 4 5 6 7 8 9
X-Received: by 2002:ac8:724c:: with SMTP id l12mr10290557qtp.131.1631884815987;
Fri, 17 Sep 2021 06:20:15 -0700 (PDT)
X-Received: by 2002:aca:670c:: with SMTP id z12mr4042958oix.14.1631884815633;
Fri, 17 Sep 2021 06:20:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 06:20:15 -0700 (PDT)
In-Reply-To: <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com> <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Fri, 17 Sep 2021 13:20:15 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 0
View all headers
it strikes me that the problem must be the includes: is failing.


Subject: Re: button disable?
From: vin...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 01:22 UTC
References: 1 2 3 4 5 6 7 8 9 10
X-Received: by 2002:a05:622a:11d0:: with SMTP id n16mr12991322qtk.297.1631928155019;
Fri, 17 Sep 2021 18:22:35 -0700 (PDT)
X-Received: by 2002:a9d:7f07:: with SMTP id j7mr12174613otq.84.1631928154696;
Fri, 17 Sep 2021 18:22:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 18:22:34 -0700 (PDT)
In-Reply-To: <a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:44b8:215d:5b00:e129:f8ea:e4c5:dd38;
posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 2001:44b8:215d:5b00:e129:f8ea:e4c5:dd38
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com> <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
<a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9fea8799-927e-4daf-b9a2-803c276c6ae5n@googlegroups.com>
Subject: Re: button disable?
From: vin...@gmail.com (vin...@gmail.com)
Injection-Date: Sat, 18 Sep 2021 01:22:35 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
View all headers
On Friday, 17 September 2021 at 23:20:16 UTC+10, john c wrote:
it strikes me that the problem must be the includes: is failing.

You should now try substituting the #beEnabled: message send with a Transcript output:

(self canEnableLoad)
    ifTrue:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ Transcript nextPutAll: 'Enabled'; cr ]]
    ifFalse:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ Transcript nextPutAll: 'Enabled'; cr ]].

By the way is the button in a Presenter or in a Shell?

Vince


Subject: Re: button disable?
From: vin...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 01:23 UTC
References: 1 2 3 4 5 6 7 8 9 10
X-Received: by 2002:ac8:4111:: with SMTP id q17mr13357433qtl.264.1631928204872;
Fri, 17 Sep 2021 18:23:24 -0700 (PDT)
X-Received: by 2002:a05:6830:19c2:: with SMTP id p2mr12468043otp.346.1631928204559;
Fri, 17 Sep 2021 18:23:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 17 Sep 2021 18:23:24 -0700 (PDT)
In-Reply-To: <a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:44b8:215d:5b00:e129:f8ea:e4c5:dd38;
posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 2001:44b8:215d:5b00:e129:f8ea:e4c5:dd38
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com> <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
<a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6043d46b-4217-4273-9125-39108363eb49n@googlegroups.com>
Subject: Re: button disable?
From: vin...@gmail.com (vin...@gmail.com)
Injection-Date: Sat, 18 Sep 2021 01:23:24 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
View all headers
On Friday, 17 September 2021 at 23:20:16 UTC+10, john c wrote:
it strikes me that the problem must be the includes: is failing.

You should now try substituting the #beEnabled: message send with a Transcript output:

(self canEnableLoad)
ifTrue:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ Transcript nextPutAll: 'Enabled'; cr ]]
ifFalse:[(#(#onLoadEnabled) includes: aCommandQuery command) ifTrue: [ Transcript nextPutAll: 'Disabled'; cr ]].

By the way is the button in a Presenter or in a Shell?

Vince


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 13:37 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
X-Received: by 2002:ac8:6697:: with SMTP id d23mr15254940qtp.34.1631972248175;
Sat, 18 Sep 2021 06:37:28 -0700 (PDT)
X-Received: by 2002:a05:6830:4084:: with SMTP id x4mr13444168ott.280.1631972247826;
Sat, 18 Sep 2021 06:37:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 06:37:27 -0700 (PDT)
In-Reply-To: <6043d46b-4217-4273-9125-39108363eb49n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com> <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
<a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com> <6043d46b-4217-4273-9125-39108363eb49n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <27bcda4e-caf5-4469-8c35-7522fe8b45c1n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Sat, 18 Sep 2021 13:37:28 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 8
View all headers
hi vince,

transcript shows Disabled

button is still enabled

button is in a shell(dialog) at the same level as the cancel/ok

john


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 16:13 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
X-Received: by 2002:a37:674a:: with SMTP id b71mr8953345qkc.360.1631981590979;
Sat, 18 Sep 2021 09:13:10 -0700 (PDT)
X-Received: by 2002:aca:606:: with SMTP id 6mr8302569oig.82.1631981590692;
Sat, 18 Sep 2021 09:13:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 09:13:10 -0700 (PDT)
In-Reply-To: <6043d46b-4217-4273-9125-39108363eb49n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com> <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
<a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com> <6043d46b-4217-4273-9125-39108363eb49n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <880b2828-3f8e-4b29-a92f-e20443ee6486n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Sat, 18 Sep 2021 16:13:10 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 15
View all headers
did some experimenting.

created a new shell with only menu option to open the problem dialog. it worked!

i went to the "real" shell and just selected the menu to open the problem dialog. it worked!

i then went back and went thru the same sequence except for opening the db before opening the dialog. it failed.

i went and opened the dialog (good result), then open the db, and then opened the dialog again. it failed.

so it has something to do with what is going on in my shell/openDb. any suggestions on what i should be looking for in my main shell which would cause queryCommand to not work in a dialog?

btw, thanks for all your help.


john


Subject: Re: button disable?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 18:55 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12
X-Received: by 2002:a37:674a:: with SMTP id b71mr9536373qkc.360.1631991338545;
Sat, 18 Sep 2021 11:55:38 -0700 (PDT)
X-Received: by 2002:a9d:ea5:: with SMTP id 34mr14386430otj.258.1631991337989;
Sat, 18 Sep 2021 11:55:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 18 Sep 2021 11:55:37 -0700 (PDT)
In-Reply-To: <880b2828-3f8e-4b29-a92f-e20443ee6486n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.2.133.13; posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 24.2.133.13
References: <41f871a8-ff46-48f4-9d52-80d4bace63c4n@googlegroups.com>
<cc097da0-2e1c-4728-9b1d-fd180952ea7en@googlegroups.com> <6c748825-ea40-498e-813b-a47fd927c6c4n@googlegroups.com>
<b137956c-64e2-4e75-8ad3-e7acfb68de99n@googlegroups.com> <f5e1fc7f-659c-4aac-bd40-90518c2d7e30n@googlegroups.com>
<43c3a13c-527d-4dab-b6ba-4029fedca11fn@googlegroups.com> <bfeab538-03a9-451e-af85-f8c6f5449c5dn@googlegroups.com>
<4689b744-b095-457a-8a7b-9d3b18c70eccn@googlegroups.com> <0753c047-c5df-4654-b59a-d7cd194b1a65n@googlegroups.com>
<a8c401a6-589b-477c-a843-5863cc498040n@googlegroups.com> <6043d46b-4217-4273-9125-39108363eb49n@googlegroups.com>
<880b2828-3f8e-4b29-a92f-e20443ee6486n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <62835d33-5ab0-489a-a098-a5fa72f3a8e0n@googlegroups.com>
Subject: Re: button disable?
From: jndbusin...@gmail.com (john c)
Injection-Date: Sat, 18 Sep 2021 18:55:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 14
View all headers
On Saturday, September 18, 2021 at 12:13:11 PM UTC-4, john c wrote:

i think i figured it out.

in my main shell i had the method name the same as the method name in the dialog. i enabled/disabled the method in the main shell queryCommand based on whether the db was open or not. subsequently i changed the name of the main shell message but forgot to change the name in the main shell queryCommand. so it appears the queryCommand of the main shell overrides the queryCommand in the dialog if there is a method name clash. i assume this is the result of symbols being globally unique.

thanks for all your help.

john


1
rocksolid light 0.7.2
clearneti2ptor