Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using .NewObject method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00552519
Message ID:
00552527
Vues:
14
Hi!

You can, but it is a bit tricky and hard to maintain. Better put it in the class.

Alos, some notes to your code :))
with This.frmOESWAdmin.pgfOESWAdmin.pgeShifts... <--(I'm lazy) && I'm too - why use '&' and type 
                                           all thous "cPathToObject"s?

  .NewObject("oleShiftCalendar","oleCalendar","BaseControls")
  .oleShiftCalendar.Height = 286
  .oleShiftCalendar.Left   = 472
  .oleShiftCalendar.Top    = 18
  .oleShiftCalendar.Width  = 301
  .oleShiftCalendar.ShowDateSelectors = .T.
  .oleShiftCalendar.Visible = .T.
endwith
>Hi,
>
>I have the following code in a custom method:
>
>Local cPathToObject
>
>cPathToObject = "This.frmOESWAdmin.pgfOESWAdmin.pgeShifts." <--(I'm lazy)
>
>&cPathToObject.NewObject("oleShiftCalendar","oleCalendar","BaseControls")
>&cPathToObject.oleShiftCalendar.Height = 286
>&cPathToObject.oleShiftCalendar.Left = 472
>&cPathToObject.oleShiftCalendar.Top = 18
>&cPathToObject.oleShiftCalendar.Width = 301
>&cPathToObject.oleShiftCalendar.ShowDateSelectors = .T.
>&cPathToObject.oleShiftCalendar.Visible = .T.
>
>
>My question is, can I also put code in the calendar's right click method here or do I have to include it in the class this is based on ?
>
>PS: Really looking forward to the WhilFest to get some "face to face" on things like this.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform