Home » Community » Newbie corner » How to add controls from bazaar in my apps ?
|
Re: How to add controls from bazaar in my apps ? [message #31167 is a reply to message #31165] |
Fri, 11 February 2011 11:50   |
mr_ped
Messages: 826 Registered: November 2005 Location: Czech Republic - Praha
|
Experienced Contributor |
|
|
You probably don't have bazaar nest listed in your assembly.
Use "Set main package" and in the left pane with assemblies edit your current one, or add new one if you are worried about old projects having some conflicts with bazaar packages (unlikely, but not impossible).
In edit append path to bazaar dir to other nest's paths (first input).
Should work then (I'm not aware of other step needed).
PS. will try to improve the guide, you are right, it's missing there, but need some spare time.
[Updated on: Fri, 11 February 2011 11:51] Report message to a moderator
|
|
|
Re: How to add controls from bazaar in my apps ? [message #31171 is a reply to message #31167] |
Fri, 11 February 2011 14:37   |
 |
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Thanks ! I can now add packages from bazaar 
But I've still a problem when I compile, as soon as I add EditFile control in the .lay file :
main.cpp
In file included from /home/joseph/upp/uppsrc/CtrlCore/lay.h:22,
from /home/joseph/upp/MyApps/testEditFile/testEditFile.h:9,
from /home/joseph/upp/MyApps/testEditFile/main.cpp:1:
/home/joseph/upp/MyApps/testEditFile/testEditFile.lay:2: error: ‘EditFile’ does not name a type
In file included from /home/joseph/upp/uppsrc/CtrlCore/lay.h:36,
from /home/joseph/upp/MyApps/testEditFile/testEditFile.h:9,
from /home/joseph/upp/MyApps/testEditFile/main.cpp:1:
/home/joseph/upp/MyApps/testEditFile/testEditFile.lay: In function ‘void InitLayout(Upp::Ctrl&, L&, D&, testEditFileLayout__layid&) [with L = testEditFile, D
= testEditFile]’:
/home/joseph/upp/uppsrc/CtrlCore/TopWindow.h:239: instantiated from ‘void Upp::CtrlLayout(T&) [with T = testEditFile]’
/home/joseph/upp/uppsrc/CtrlCore/TopWindow.h:247: instantiated from ‘void Upp::CtrlLayout(T&, const char*) [with T = testEditFile]’
/home/joseph/upp/MyApps/testEditFile/main.cpp:7: instantiated from here
/home/joseph/upp/MyApps/testEditFile/testEditFile.lay:2: error: ‘class testEditFile’ has no member named ‘edfFile1’
/home/joseph/upp/MyApps/testEditFile/testEditFile.lay:2: error: ‘class testEditFile’ has no member named ‘edfFile1’
/home/joseph/upp/MyApps/testEditFile/testEditFile.lay:2: error: ‘class testEditFile’ has no member named ‘edfFile1’
testEditFile: 1 file(s) built in (0:02.12), 2127 msecs / file, duration = 2132 msecs, parallelization 0%
There were errors. (0:02.28)
Here are my files :
TestEditFile.h
#ifndef _testEditFile_testEditFile_h
#define _testEditFile_testEditFile_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define LAYOUTFILE <testEditFile/testEditFile.lay>
#include <CtrlCore/lay.h>
class testEditFile : public WithtestEditFileLayout<TopWindow> {
public:
typedef testEditFile CLASSNAME;
testEditFile();
};
#endif
main.cpp
#include "testEditFile.h"
testEditFile::testEditFile()
{
CtrlLayout(*this, "Window title");
}
GUI_APP_MAIN
{
testEditFile().Run();
}
testEdifFile.lay
LAYOUT(testEditFileLayout, 332, 344)
ITEM(EditFile, edfFile1, LeftPosZ(12, 296).TopPosZ(12, 19))
END_LAYOUT
mr_ped wrote on Fri, 11 February 2011 11:50 | PS. will try to improve the guide, you are right, it's missing there, but need some spare time. 
|
Yes, time is always a problem !
... But if you do, maybe you'll loose less time to answer beginner's questions 
|
|
|
Re: How to add controls from bazaar in my apps ? [message #31172 is a reply to message #31171] |
Fri, 11 February 2011 14:46   |
|
Hi,
You're missing #include <Controls4U/Controls4U.h> in TestEditFile.h
//...
#include <CtrlLib/CtrlLib.h>
#include <Controls4U/Controls4U.h>
using namespace Upp;
If you use some widget in *.lay files then you'll have to get it into the scope (include it's file) before *.lay include.
// I.e.:
#include <SomeHeader>
// SomeWidget will be used in .lay file
#define LAYOUTFILE <testEditFile/testEditFile.lay>
#include <CtrlCore/lay.h>
Andrei
|
|
|
|
|
|
|
Re: How to add controls from bazaar in my apps ? [message #31190 is a reply to message #31189] |
Fri, 11 February 2011 23:19   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello Beji
Welcome back!
AFAIK, Controls4U.h include can be before or after namespace. In fact, in Controls4U_demo, it is after namespace.
As Andrei says, it is necessary to put it before this:
#define LAYOUTFILE <testEditFile/testEditFile.lay>
#include <CtrlCore/lay.h>
, because testEditFile.lay uses classes declared in CtrlLib.h and Controls4U.h.
Best regards
Iñaki
[Updated on: Fri, 11 February 2011 23:19] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Mon Apr 28 01:01:29 CEST 2025
Total time taken to generate the page: 0.04413 seconds
|