I'm still not sure how custom control and object-oriented programming interact, can someone enlighten me please?
I spent some time trying to understand the relationship between the custom controls and object oriented programming. However, it is not quite clear to me yet.
What I want to do:
I want to have a custom control and hide its workings from the rest of the blockdiagram, so I don't have to wire for each similar object. Not only because I'm lazy , but also to keep the clean pattern and avoid mistakes.
for example, a graph, a numerical factor and a button.
When the button is pressed, the x scale must be changed according to the factor.
So, this looks like a job for me to object-oriented programming. Once I created something that can do this, I can use it all through my program. The code that redraws the figure when you press the button as part of the object, so I can't connect extra wires and add a value change event when I add a new chart.
Is this possible at all? I tried, but did not quite understand this time. I have to admit that I'm pretty new to OO programming and make custom controls. I use typedef clusters ' ed most my code so far, which works very well. But it's always a cluster of stupid, the only way to have nothing at all is in the block diagram in VI you use it in.
The only thing I could come up with so far is to add an "event handler" Subvi who does and that he accepts a reference or a local variable to an object. Then, this sub - VI and the variable or reference can be put in parallel with the other stuff in the main loop of the program. But there must be a better way somewhere?
I don't think I can solve this problem of definition of the objects of the Panel before custom and methods so that it can interact with the objects that it represents without help. I get the feeling that I must have missed it somewhere. The pointers will be appreciated.
Thank you!
Jacco.
Jacco K wrote:
What I want to do:
I want to have a custom control and hide its workings from the rest of the blockdiagram, so I don't have to wire for each similar object. Not only because I'm lazy , but also to keep the clean pattern and avoid mistakes.
...
The only thing I could come up with so far is to add an "event handler" Subvi who does and that he accepts a reference or a local variable to an object. Then, this sub - VI and the variable or reference can be put in parallel with the other stuff in the main loop of the program. But there must be a better way somewhere?
Thank you!
Jacco.
Hi Jacco,
These two things are exactly what are the Xcontrols, a basic VI with a façade that has an event structure (the façade VI).
If you have any questions, I'm happy to guide you.
Tone
Tags: NI Software
Similar Questions
-
Hello
Hi have you tried to change the language of the site. To change the preferred language, select file > Site Properties > content tab and select the language from the drop-down list.
Also, try to click the icon on the Panel of text, as shown below
See if that helps.
-
Navigation in AS3 OBJECT oriented programming Menu does not
OK, so frame 1 in the timeline/layer, I have this code
Stop();
var btn1:MCButton = new MCButton();
Btn1.x = 1048;
Btn1.y = 300;
Btn1.label_txt. Text = "play";
addChild (btn1);
Btn1.gotoAndStop (10);
var btn2:MCButton = new MCButton();
btn2.x = 1048;
btn2.y = 380;
btn2.label_txt. Text = "help";
addChild (btn2);
var btn3:MCButton = new MCButton();
btn3.x = 1048;
btn3.y = 460;
btn3.label_txt. Text = "highscore";
addChild (btn3);
and now I have a MCButton class (.as)
package {}
import flash.display.MovieClip;
import flash.events.MouseEvent;
SerializableAttribute public class extends MovieClip {} MCButton
public void MCButton() {}
manufacturer code #.
Stop();
this.buttonMode = true; a class film btn
this.addEventListener (MouseEvent.MOUSE_OVER, sensitive); listen for a score event mouse
this.addEventListener (MouseEvent.MOUSE_DOWN, down); listen for a mouse down event
}
private void hover(e:MouseEvent):void {}
this.removeEventListener (MouseEvent.MOUSE_OVER, sensitive);
this.addEventListener (MouseEvent.MOUSE_OUT, out);
this.gotoAndStop (2);
}
private void out(e:MouseEvent):void {}
this.removeEventListener (MouseEvent.MOUSE_OUT, out);
this.addEventListener (MouseEvent.MOUSE_OVER, sensitive);
this.gotoAndStop (1);
}
private void down(e:MouseEvent):void {}
this.removeEventListener (MouseEvent.MOUSE_OVER, sensitive);
this.addEventListener (MouseEvent.MOUSE_DOWN, down);
this.gotoAndStop (3);
}
}
}
OK so I want btn1 (which is in my diapers) to frame 10, where I have a different menu for 'easy', 'medium' "hard", I put btn1.gotoAndStop (10); but that doesn't seem to work, so I'm really confused on what im doing wrong.
Please help me,
Thank you.
You can not remove sth. not created:
removeChild (btn6);
...
var btn6:MCButton = new MCButton();
you try to remove btn6-9, before they were created
I understand why you want to do, but you must make sure that the part to be removed is left side first.
You can do this by ensuring that the button you are trying to delete is really there
Change each line that removes sth. TO:
{if(btn6!=null)}
removeChild (btn6);
}
{if(btn7!=null)}
removeChild (btn7);
}
etc.
Caution:
Trying to set up a Navigation like this can not be considered good practice to OBJECT-oriented programming.
That's why I said you should be aiming for a solution that does not rely on navigation of the timeline.
-
I paid for XI today, but still have no idea how to change a PDF file - XI worked fine but I'm still not sure if XI is downloaded successfully @.
Hello Leo,
Please, watch the following videos to learn how to change the PDF file:
http://TV.Adobe.com/watch/learn-Acrobat-XI/editing-a-PDF-in-Adobe-Acrobat-XI/
Kind regards
Anoop
-
I ran the upgrade wizard. I'm still not sure what it means
Hello
Preamble: I'm not tech savvy, please he dumb down for me.
I ran the upgrade wizard and I'm still not sure if the upgrade is a good idea. I need to know whether or not it is compatible before moving with her.
I have a Dell Inspiron 1525, running Windows Vista.
Some issues that came:
Install an application to play DVDs, Sidebar gadgets are not supported, secure boot is not compatible, your screen resolution is not compatible.
I checked my screen and higher resolution, it goes up to is 1280 X 800. I tried to watch promotional videos for Windows 8, but the video does not work yet. The color was off, the sound was very good.
What does that mean? Windows still work? What should I do to make sure that I can still do normal things?
I do not know. You will need to check with the Upgrade Wizard of Windows 7, then check the manufacturer's website.
My old Vista was not able to upgrade to Windows 7 (Toshiba).
Upgrade Advisor advised me to some questions, and then I went to the Toshiba site and was informed any way uncertain "not compatible".
If you want to switch from Vista to Windows 7 - check
http://Windows.Microsoft.com/en-AU/Windows/downloads/Upgrade-Advisor
Visit the site of the manufacturer for more information.
-
Not sure how to set up Windows Fax Scan &
Original title: "Windows fax and scan"
I'm not sure how set the computer to my phone... it is already connected to the internet... If I understand correctly... I think so..
If you use a dial-up connection, then the line is indeed already used with the internet. You can do this through the internet, and you may not use this same line while it is used for the internet. You need an analog (non-digital) line separated with a fax modem or (one in your system) be bound separately or you need to switch back if it is a good analog line and you have everything you need to fax. Here's how to set up fax and scan:http://windows.microsoft.com/en-us/windows-vista/Set-up-your-computer-to-send-and-receive-faxes. Here's a FAQ on Windows Fax and scan, which can also help to answer your questions:http://windows.microsoft.com/en-us/windows-vista/Faxing-frequently-asked-questions.
I hope this helps.
Good luck!
Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
-
Trying to download my creative cloud, but get a constant rotation in the window. Not sure how to display all the applications that I'm supposed to have with the creative cloud?
Please visit: App does not open. Wheel of progress turn continuously
I hope this helps.
Concerning
Megha Rawat
-
Hello, I have a new Mac Book Pro and I'm not sure how to use it. I just 'downloaded' Lightroom and it is not showing in my toolbar or on my desk... It shows a circle that says Lightroom 5.7.1 and when I click it it brings me to the download process initiail... Help!
Hello
Please click on the first " Finder " icon on the dock (toolbar below) on your screen, in the left panel, you will see an option, click on 'Applications' on it.
Under the present, you should be able to see Lightroom if it is properly installed.
Let us know if that helps.
Kind regards
Bani
-
I was handed this software this morning which is installed at the end of the day and I have never delt with cloud based adobe installation, I created the package this morning and have it installed on a machine but I'm not sure how to enable it
Creative cloud learn & support
http://helpx.Adobe.com/creative-cloud.html
Cloud creation help / install, update or uninstall applications
http://helpx.Adobe.com/creative-cloud/help/install-apps.html
-
I tried to insert a password to protect a document that I send. He told me to add a service that I paid for. I'm still not able to protect document and install a password. I went to tools-Protect but he always tells me that I have to pay for this service after I did. How can I add a password to open my document?
Hi cj47163119,
You need Acrobat application to secure your document with password. It seems that you use Acrobat Reader.
Acrobat Reader is a free service and do not have this option.
If you have Acrobat subscription, you can download it here: Download Adobe Acrobat products. Standard, Pro | DC, XI, X
For more help, see this KB doc: Security with passwords, Adobe Acrobat PDF files
Kind regards
Meenakshi
-
I have a Dell Inspiron with windows XP and I can not start. I have the windows disc but do not know how to clean and reinstall. Please help me
You can repair XP or try the following:
http://support.Microsoft.com/kb/917964
http://support.Microsoft.com/kb/307545TO
Re - install http://support.microsoft.com/kb/978788
-
I have a problem I bought the collection master in 2012 for Mac just got a new computer with Windows 10 and I do not know how to download and install master collection on my new computer, can someone help me?
Available downloadable Setup files:
- Suites and programs: CC 2015 | CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
- Acrobat: DC, XI, X | Suite X | 9,8 | 9 standard | 8 standard
- Captivate: 8 | 7 | 6 | 5.5, 5 | 1
- Cold Fusion: 11: 10 | 9.0.2 version 9.0.0, 9.0.1, 8.0.1, 8.0.0, 7.0, 6.1, 6.0, 5.0, 4.0
- Contribute: CS5 | CS4, CS3 | 3,2
- FrameMaker: 12, 11, 10, 9, 8, 7.2
- Lightroom: 6| 5.7.1| 5 | 4 | 3
- Photoshop Elements: 14,13,12,11,10 | 9,8,7 win | 8 mac | 7 mac
- Premiere Elements: 14,13,12,11,10| 9, 8, 7 win | 8 mac | 7 mac
Download and installation help links Adobe
Help download and installation to Prodesigntools links can be found on the most linked pages. They are essential; especially steps 1, 2 and 3. If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".
-
My creative cloud, 'Applications' tab does not load, how do I fix this so that I can update my Adobe programs for current versions?
Please take a look at this document:
-
Can someone tell me please how best to add a circle or an arrow to a culmination of imovie sport on video?
iMovie 10.1.2 (latest version) doesn't have a function in the application for the addition of these graphics, or it accepts third party plug-ins to do that.
However, you might find the useful Karsten Schlüter article: How to create a pointer or a title custom
Domingo article explains how to create an arrow or a circle, using the application on your computer. Open all still in the preview. Edition/select everything and then delete (on your keyboard). Then use tools/Annotation of the preview application to create an arrow or circle. Save as a .png. Drag your annotation in your iMovie project. Use the image based on the image of iMovie to overlay arrow or a circle on your video. Unfortunately, you can not
use the arrow or circle to follow a movement figure on a video. You would have to use on the scenes where the character moves to the camera, or are underway
followed by the camera so the figure is kept central in the scene. Or, you can create a still in your video to insert the arrow to identify the figure.
Karsten article also mentions other graphics applications.
-
I have a MacBook from 2008. 4 years ago I moved my iPhoto on an external hard drive. I have thousands if photos on it. IPhoto on the external hard drive will not launch despite the force quit and relaunch several times. Can someone help me?
< re-titled by host >
I moved my iPhoto on an external hard drive.
Did you move the iPhoto library for the external hard drive or the iPhoto application, or both?
How is formatted the external hard drive? Is the file system on the drive Mac OS extended (journaled) or other system files? Is the drive directly connected by USB or similar, or is it a SIN?
IPhoto on the external hard drive will not launch despite the force quit and relaunch several times.
I don't understand - if you force quit smoking, launches the application, or you can not force it quit?
IPhoto is suspended without doing anything, when you launch?
What version of iPhoto does? And what version of Mac OS X?
Maybe you are looking for
-
strange problems with presario cq71-210sv
all started 2 days ago. Day 1. When the laptop is on battery everything works beautifully. then on 10%, I put the power supply and press the button began to malfunction. the mouse works does not or does not work well. cut the food and everything is n
-
Photon: WiFi and 4G does not work after update to 45.2.7
I just installed the update 45.2.7.MB855 on my Photon Sprint 4 G and now my 4G and WiFi lights. When I go to network & wireless settings and click on WiFi, everything he says is error and nothing happens. When I try to turn in 4G, nothing seems to ha
-
Copy files to another directory
Before I'm going to reinvent the wheel again, does anyone know a LabVIEW feature that can perform the following operations: If I have a folder with files A, B, C, D, E, F, G and another file with only the files A, C, D, E Is there a function that che
-
Win 7... \Users\User name REGTRANS-MS and BLF files
TRANS-MS and BLF files belong in this folder?
-
Before that my computer says welcome it becomes black. How can I fix it?
My computer is an XP. After that I turned on my computer, it's the normal thing. After it loads it goes black. What should I do?