Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7273 > unrolled thread
| Started by | Paulo Oliveira <paulo@clipinfor.com> |
|---|---|
| First post | 2014-10-07 03:12 -0700 |
| Last post | 2014-10-10 10:36 -0700 |
| Articles | 10 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Show DataDialog and execute a method Paulo Oliveira <paulo@clipinfor.com> - 2014-10-07 03:12 -0700
Re: Show DataDialog and execute a method George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-10-07 03:15 -0700
Re: Show DataDialog and execute a method George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-10-07 03:49 -0700
Re: Show DataDialog and execute a method Paulo Oliveira <paulo@clipinfor.com> - 2014-10-07 04:22 -0700
Re: Show DataDialog and execute a method D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-10-07 15:14 +0200
Re: Show DataDialog and execute a method Gunter <g.huebner@dsh-anklam.de> - 2014-10-08 06:36 -0700
Re: Show DataDialog and execute a method "Jamal" <someone@example.com> - 2014-10-08 11:12 -0400
Re: Show DataDialog and execute a method Paulo Oliveira <paulo@clipinfor.com> - 2014-10-09 06:38 -0700
Re: Show DataDialog and execute a method "Jamal" <someone@example.com> - 2014-10-09 12:03 -0400
Re: Show DataDialog and execute a method George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-10-10 10:36 -0700
| From | Paulo Oliveira <paulo@clipinfor.com> |
|---|---|
| Date | 2014-10-07 03:12 -0700 |
| Subject | Show DataDialog and execute a method |
| Message-ID | <91332ea7-77f4-485c-b00d-7ca236f2fd7c@googlegroups.com> |
Hi all, I want to open a window and then execute a method, postinit is not the solution because if I call the method in postinit it is executed and only then the window appears. Any solution? TIA Paulo Oliveira
[toc] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2014-10-07 03:15 -0700 |
| Message-ID | <d7735763-68f6-413a-8a5e-7808995a3fce@googlegroups.com> |
| In reply to | #7273 |
Hi Paulo Call the method inside to EXPOSE(). George
[toc] | [prev] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2014-10-07 03:49 -0700 |
| Message-ID | <4cad279e-9b46-43cf-a7ef-2657b5e0b9a0@googlegroups.com> |
| In reply to | #7274 |
I forgot to write if you want to execute the method only once.
CLASS MyWindow INHERIT somthing
LOCAL lFirst:=TRUE AS LOGIC
METHOD Expose() CLASS MyWindow
IF lFirst
SELF:YourMethod()
lFirst:=FALSE
ENDIF
RETURN NIL
George
[toc] | [prev] | [next] | [standalone]
| From | Paulo Oliveira <paulo@clipinfor.com> |
|---|---|
| Date | 2014-10-07 04:22 -0700 |
| Message-ID | <b2f7fa7f-e272-4654-9bf6-ecc4fee48ac3@googlegroups.com> |
| In reply to | #7275 |
Terça-feira, 7 de Outubro de 2014 11:49:05 UTC+1, George Tritsos escreveu: > I forgot to write if you want to execute the method only once. > > > > CLASS MyWindow INHERIT somthing > > LOCAL lFirst:=TRUE AS LOGIC > > > > METHOD Expose() CLASS MyWindow > > IF lFirst > > SELF:YourMethod() > > lFirst:=FALSE > > ENDIF > > RETURN NIL > > > > George Thanks George, Works fine.
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2014-10-07 15:14 +0200 |
| Message-ID | <1pp73a16cq3p3lh3ln1rl8ojsged2v8r7v@4ax.com> |
| In reply to | #7273 |
On Tue, 7 Oct 2014 03:12:42 -0700 (PDT), Paulo Oliveira <paulo@clipinfor.com> wrote: Hello Paulo, > >I want to open a window and then execute a method, postinit is not the solution because > if I call the method in postinit it is executed and only then the window appears. >Any solution? > Wouldn't the Window:PreInit() Method help in your case? Dick
[toc] | [prev] | [next] | [standalone]
| From | Gunter <g.huebner@dsh-anklam.de> |
|---|---|
| Date | 2014-10-08 06:36 -0700 |
| Message-ID | <fdaf30b9-0624-4d93-8c7d-e800b5069995@googlegroups.com> |
| In reply to | #7273 |
Hello, I do this so: Method Init() class... ... self:RegisterTimer(1,true) Method Timer() class ... self:callYourMethod() Gunter
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-10-08 11:12 -0400 |
| Message-ID | <m13k9b$8gn$1@speranza.aioe.org> |
| In reply to | #7273 |
Paulo,
You can also override the Show(kStyle) of the window.
For example:
Method Show(kStyle) Class MyWindow
Super:Show(KStyle) // show MyWindow
// Call any other method here!
// Self:MyMethodToExecute()
return self
Jamal
"Paulo Oliveira" wrote in message
news:91332ea7-77f4-485c-b00d-7ca236f2fd7c@googlegroups.com...
Hi all,
I want to open a window and then execute a method, postinit is not the
solution because if I call the method in postinit it is executed and only
then the window appears.
Any solution?
TIA
Paulo Oliveira
[toc] | [prev] | [next] | [standalone]
| From | Paulo Oliveira <paulo@clipinfor.com> |
|---|---|
| Date | 2014-10-09 06:38 -0700 |
| Message-ID | <7bc686cb-ad53-4a24-8439-f3293319cdfe@googlegroups.com> |
| In reply to | #7281 |
METHOD Expose(oExposeEvent) CLASS dtdGerarDifInventario
LOCAL oBoundingBox AS BoundingBox
oBoundingBox := IIf(oExposeEvent == NULL_OBJECT, NULL_OBJECT, oExposeEvent:ExposedArea)
SUPER:Expose(oExposeEvent)
//Put your changes here
IF SELF:lShow
SELF:lShow:=FALSE
SELF:CriaMovimentosAcerto()
SELF:oDCbBPositivas:Use(SELF:oabPositivos)
SELF:oDCbBNegativas:Use(SELF:oabNegativos)
ENDIF
RETURN NIL
This is what i done and works fine... for now.
Paulo
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-10-09 12:03 -0400 |
| Message-ID | <m16bke$lpb$1@speranza.aioe.org> |
| In reply to | #7282 |
Paulo,
Yes, the Expose( ) callback method works but it is not the most efficient as
it gets invoked automatically when a window requires repainting because it:
Is partially uncovered by another window
Is first shown
Increases in size
Is being restored after being iconized
I know you have:
"IF SELF:lShow
SELF:lShow:=FALSE
"
However, the Show() method is only called once!
Your choice :)
Jamal
"Paulo Oliveira" wrote in message
news:7bc686cb-ad53-4a24-8439-f3293319cdfe@googlegroups.com...
METHOD Expose(oExposeEvent) CLASS dtdGerarDifInventario
LOCAL oBoundingBox AS BoundingBox
oBoundingBox := IIf(oExposeEvent == NULL_OBJECT, NULL_OBJECT,
oExposeEvent:ExposedArea)
SUPER:Expose(oExposeEvent)
//Put your changes here
IF SELF:lShow
SELF:lShow:=FALSE
SELF:CriaMovimentosAcerto()
SELF:oDCbBPositivas:Use(SELF:oabPositivos)
SELF:oDCbBNegativas:Use(SELF:oabNegativos)
ENDIF
RETURN NIL
This is what i done and works fine... for now.
Paulo
[toc] | [prev] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2014-10-10 10:36 -0700 |
| Message-ID | <9247a8d9-7218-40d8-9444-0eab98c0417b@googlegroups.com> |
| In reply to | #7283 |
Paulo, It was my fault or first in my mind that moment sorry for that. The best solutions are PostInit and PreInit which are the only ones invited only at once. Dick was right for that. All other solutions should have a trick even the Show() e.g. if you call Hide() and Show() again window. Jamal has right for: "when a window requires repainting because it: is partially uncovered by another window Is first shown Increases in size Is being restored after being iconized" Sorry again Regards George
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web