Hot Door CORE Forum
Using XCODE with core - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Getting started (http://hotdoorcore.com/forum/forumdisplay.php?fid=6)
+--- Thread: Using XCODE with core (/showthread.php?tid=6)

Pages: 1 2 3 4


RE: Using XCODE with core - garrett - 03-05-2014

(03-04-2014, 01:23 PM)VincentDoan Wrote: How do you check or uncheck the panel flyout menu item?
I looked in the entry class, it is not there.

This has not been implemented yet, and is on our to-do list. For now, you will simply have to change the title of the affected flyout entry.

For example, if you had a flyout entry that would show additional options for your panel, then you could toggle its value from "Show Options" to "Hide Options", etc.

(03-04-2014, 02:30 PM)VincentDoan Wrote: by the way, CORE thinks CS5 does not support multi arboards, but it does.

Where did you see this limitation? In the hdi::core::CurrentDocument class, you can access the various artboards in CS5 and above. The hdi::core::Artboard class itself is also available in CS5 and above. I am unaware of any other place that enforces a limitation on Artboards, so if you found something else then please let me know.

(03-05-2014, 12:50 AM)VincentDoan Wrote: You mention to check if CORE already acquired certain suite, then don't acquire it, so how do you this?
Also I need at least the basic suite to acquire other suites, but how do I get SPBasicSuite in the first place?

The linker output lots of duplicate symbols from my suite declarations and CORE's.

The sSPBasic global is always available, so you can use it at any time. The linker is probably outputting errors for duplicate symbols because you are redeclaring suite globals. Don't redeclare them, just extern them.

If you have lines like:
Code:
AIArtSuite* sAIArt = NULL;
then remove them. Instead, just do this:
Code:
extern "C" AIArtSuite* sAIArt;

Then, when you need to use a suite, check if it is already present and acquire it if not. For example:
Code:
if(sAIArt == NULL)
{
    sSPBasic->AcquireSuite(kAIArtSuite, kAIArtSuiteVersion, &sAIArt);
}

You could write a macro to help with this if you need do it a lot.

(03-04-2014, 02:30 PM)VincentDoan Wrote: this flyout is not working for me:
...

Thanks for reporting this, it appears to be a bug in this version of CORE. A fix will be included in the next version.


RE: Using XCODE with core - VincentDoan - 03-05-2014

Great! thanks, but that assumes that I have your list of suite names, ex: I named mine as sArt not sAIArt.
Do you have that list? Can I have them please.

Vince


RE: Using XCODE with core - VincentDoan - 03-05-2014

Garrett,

I use ADMVirtualKeyArray keyArray which is in ADMTracker.h to detect user pressing a keyboard key, but CS6 and above no longer support it. Anything in CORE? If not any idea how I could do it?

Thanks,

Vincent


RE: Using XCODE with core - VincentDoan - 03-06-2014

Hi Brendon & Garrett,

On CS5 and CS4 I have a panel with 21 image buttons that act like checkboxes, when clicked I toggle the light image to indicate active/inactive. In CORE I have to use checkboxes which take too much space and looked awful.
So, my first feature request for CORE is to allow light image of button to change.

By the way, I saw this in the sample code

#elif HDI_CORE_COMPILE_AI14_MINUS()
// CS4 and below always have just one artboard
this->__docPanelArtboardsLabel.setText("1 artboard");
#endif


RE: Using XCODE with core - garrett - 03-06-2014

(03-05-2014, 09:15 PM)VincentDoan Wrote: Great! thanks, but that assumes that I have your list of suite names, ex: I named mine as sArt not sAIArt.
Do you have that list? Can I have them please.

Oh, well then you don't need to worry it. Acquire your suites the way you always have. The sample code I gave you before assumed that you named your suite globals like sAI*, sADM*, sSP*, etc. This is the way that Adobe sample code names their suites, so most people use the same format (and so I assumed you used the same format too).

The advice I gave about duplicate symbols is still true. You are probably getting those errors for the ATE suites, which Adobe names like "sParagraph", and you have a similar suite naming scheme.

(03-05-2014, 11:25 PM)VincentDoan Wrote: I use ADMVirtualKeyArray keyArray which is in ADMTracker.h to detect user pressing a keyboard key, but CS6 and above no longer support it. Anything in CORE? If not any idea how I could do it?

Yes, Adobe did remove this in CS6 and above (due to the removal of all of ADM). We currently do not have a way to accomplish the same thing in CORE, and it's on our to-do list for future versions.

What are you trying to accomplish with the tracking of keyboard keys? It's possible that your goal can be reached through other means in CORE, depending on what you want to do.

(03-06-2014, 09:30 AM)VincentDoan Wrote: By the way, I saw this in the sample code

#elif HDI_CORE_COMPILE_AI14_MINUS()
// CS4 and below always have just one artboard
this->__docPanelArtboardsLabel.setText("1 artboard");
#endif

Well, technically CS4 did have support for multiple artboards, but Adobe did not provide the AIArtboard.h suite header file until the CS5 SDK.


RE: Using XCODE with core - VincentDoan - 03-06-2014

Hi Garrett,

I am oK with the suites now.
Yes, can you please show me how to detect user pressing any keys with CORE?
By the way, how do you check/uncheck a menu item in the main pull-down menu?
As for setting up callbacks in CORE, can I pass something in the callback or does that not supported?
Vincent


RE: Using XCODE with core - garrett - 03-07-2014

(03-06-2014, 03:11 PM)VincentDoan Wrote: Yes, can you please show me how to detect user pressing any keys with CORE?

I think you misunderstood my previous post. CORE cannot detect every/any arbitrary keypress at this time, but it is something on our to-do list for future versions. However, for example, CORE has the ability to call a callback whenever a character is entered in a text field, so I was asking what you were trying to accomplish in case CORE already has your situation handled.

(03-06-2014, 03:11 PM)VincentDoan Wrote: By the way, how do you check/uncheck a menu item in the main pull-down menu?

Use the hdi::core::MenuItem:ConfusedetChecked() member function.

(03-06-2014, 03:11 PM)VincentDoan Wrote: As for setting up callbacks in CORE, can I pass something in the callback or does that not supported?

No, C/C++ function pointers are strictly typed, and since CORE cannot know what value to pass for every possible type of argument we opted for zero-argument callbacks.


RE: Using XCODE with core - VincentDoan - 03-08-2014

Thanks Garrett,
I tried to change the lightImageID on button when user clicks, but it only works if I first remove the button, change the image, then add the button back. I guess, this is OK for me.
Major road block for me: I CAN'T GET MY TOOL TO TRACK ANY OBJECT. Is there anything I need to know about CORE handling of tool cursor tracking? I acquired AIHitTestSuite *sAIHitTest (CORE does not have this acquired) as I always did and it nows do not hit any object. Must be conflicting with CORE.
Please help.
By the way, when do you think we can get the next CORE version with the flyout fixed?

UPDATE:
:-) all GUI elements worked, callbacks worked, integrated all my code and build successfully.
:-( cursor track not working as mentioned above


RE: Using XCODE with core - VincentDoan - 03-08-2014

Hi Garrett,

I have sAIArtSet in my code, and since CORE also has it, I don't acquire but it remains NULL?
I also have sAIDocumentView in my code, and since CORE also has it, I don't acquire and sAIDocumentView is not NULL, which is good.

What should I do with the sAIArtSet case?

Vincent

Anyway, I renamed sAIArtSet to sArtSet and acquire it, it return non NULL value for sArtSet.

But, sArtSet->CountArtSet(*gSet, &count); returns zero for count when I have a few paths on board.
There must be conflict somewhere with CORE?

Vincent

Sorry, this is the complete code:

sArtSet->NewArtSet(&gSet);
sArtSet->SelectedArtSet(gSet);
sArtSet->CountArtSet(*gSet, &count);

count is zero
got to be conflicting with CORE, because this is very simple code that have been working before.


RE: Using XCODE with core - VincentDoan - 03-09-2014

I encounter another conflict with CORE handling suite, I think. This time it is the HitTest.
I acquire sHitTest myself and can't get any hit on path, is this a conflict with CORE hit test?.
So, I use CORE hit test as follow:
bool isValid = this->__artblue.cursorHitData(hitData,
//hdi::core::SegPointHitRequest,
hdi::core::FillHitRequest,
7.0);
if (isValid) {
if (hitData.hit()) {
hitType = hitData.hitType();
seg = hitData.segPointIndex(); // -1 if not SegPointHit, SegInPointHit, or SegOutPointHit
t = hitData.tValue();
hitPoint = hitData.point();
//bz = hitData.bezier();
}
isValid = false;
}
}
With only FillHitRequest enabled, CORE reports hits on everything (segment, points, handle in/out).

With only SegPointHitRequest enabled, CORE reports hits segment but never anchor hit.

Am I correct?

Vincent