English
Forum

Methods of other objects own properties transfer

 

Nico
Madysa
and again I ...

i don't know, whether I me or on XProfan doubt should.
following situation: I have two Objects verschiedener classes. the Objekt You# sustain the Objekt I# as Parameter and calls which method on. thereby commit You# the method of I# a Own quality as Parameter.
CompileMarkSeparation
 {$iq}
Class Nummereins = a&,GetA@

proc Nummereins.GetA

    parameters einezahl&
    return .a& * einezahl&

endproc

Class Derandere = #b&,Multi@

proc Derandere.Multi

    parameters Objekt#
    .b& = 14
    return Objekt#.GetA(.b&)

endproc

declare Ich#,Du#
Dim Ich#,Nummereins
Dim Du#,Derandere
Ich#.a& = 3
cls
print Du#.Multi(Ich#)
waitinput
Dispose Ich#,Du#
end

my trouble: once The quality, The the Parameter-Objekt transfer becomes, private is (so, as itself with ordentlicher OOP heard), knallt it. (no Access to protected quality) I suspect, that XProfan Problems with ever of/ one shape of Stack has. gives it a Possibility, the trouble To circumvent or to fix?

Sincerely,

Nico
 
Nico Madysa
06/19/10  
 




RGH
Hi,

your trouble depends so together, that XProfan whom Parameter .b& first in the row "Parameters" auswertet ... and there's the Access to protected properties one others Objektes you don't say so.
the can You bypass, because You a local Variable verwendest, The You as Parameter commit.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
06/20/10  
 




Nico
Madysa
Yes, so what have I vermutet. have too straight fixes, that it too functions, if is a (public) Gettermethode commit.
CompileMarkSeparation
Class Nummereins = a&,GetA@

proc Nummereins.GetA

    parameters einezahl&
    return .a& * einezahl&

endproc

Class Derandere = #b&,GetB@,Multi@

proc Derandere.GetB

    return .b&

endproc

proc Derandere.Multi

    parameters Objekt#
    .b& = 14
    return Objekt#.GetA(.GetB())

endproc

declare Ich#,Du#
Dim Ich#,Nummereins
Dim Du#,Derandere
Ich#.a& = 3
cls
print Du#.Multi(Ich#)
waitinput
Dispose Ich#,Du#
end

thanks for speedy response, Roland.

Sincerely,

Nico
 
Nico Madysa
06/20/10  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.356 Views

Untitledvor 0 min.

Themeninformationen

this Topic has 2 subscriber:

Nico Madysa (2x)
RGH (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie