|
-
Jun 9th, 2000, 04:12 AM
#1
Thread Starter
Frenzied Member
I'm Doing a Fractal Control and I want to have a couple of properties as Complex Numbers, I have a UDT
Code:
Public Type Complex
Real As Double
Imaginary As Double
End Type
but this is pretty useless in the Design Time Property Window, I want to have a String in the Property Window like "4+3i" but at Runtime I want this to be my UDT.
Is there any way of doing this, obviously I can do the conversions myself but How do I handle this conflict in Types?
Thanks in adv
-
Jun 9th, 2000, 04:48 AM
#2
I don't really get what you're saying? You want to convert a String to a Double?
[b]
Code:
Complex.Real = MyString
-
Jun 9th, 2000, 05:04 AM
#3
transcendental analytic
Hehe, Sam, i'm sure you can do it with a classmodule, but for an udt, maybe you should use a function or something:
Function cx2str$(Cx as complex)
and
Function str2cx(str$) as complex
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 9th, 2000, 05:17 AM
#4
Thread Starter
Frenzied Member
No, That's not what I want at all.
I have my User Defined Type Complex and a property
Centre as Complex
This is fine to do at runtime but you can't have a udt appear in the property window, it's expecting a string.
How Do I controll the string interface to the property window without having the property a string at runtime?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|