Cocos2d-x 3.1.1 lua-tests 开篇
#include "cocos2d.h"
#include "AppDelegate.h"
#include "CCLuaEngine.h"
#include "audio/include/SimpleAudioEngine.h"
#include "lua_assetsmanager_test_sample.h" using namespace CocosDenshion; USING_NS_CC; AppDelegate::AppDelegate()
{
} AppDelegate::~AppDelegate()
{
SimpleAudioEngine::end();
} bool AppDelegate::applicationDidFinishLaunching()
{
// 获得导演类实例
auto director = Director::getInstance();
// 获取渲染全部东西的 EGLView NA NA
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLView::createWithRect("Lua Tests", Rect(0,0,900,640));
director->setOpenGLView(glview);
} // turn on display FPS
// 打开显示帧屏
director->setDisplayStats(true); // set FPS. the default value is 1.0/60 if you don't call this
// 设置游戏画面每秒显示的帧数,默认是60帧。
director->setAnimationInterval(1.0 / 60); // 获得屏幕大小
auto screenSize = glview->getFrameSize(); // 获得设计大小
auto designSize = Size(480, 320); if (screenSize.height > 320)
{
auto resourceSize = Size(960, 640);
director->setContentScaleFactor(resourceSize.height/designSize.height);
} // 设置屏幕设计分辨率
glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::FIXED_HEIGHT); // register lua engine
LuaEngine* pEngine = LuaEngine::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(pEngine); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID ||CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
LuaStack* stack = pEngine->getLuaStack();
register_assetsmanager_test_sample(stack->getLuaState());
#endif
// 执行脚本语言
pEngine->executeScriptFile("src/controller.lua"); return true;
} // This function will be called when the app is inactive. When comes a phone call,it's be invoked too
void AppDelegate::applicationDidEnterBackground()
{
Director::getInstance()->stopAnimation(); SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
} // this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
Director::getInstance()->startAnimation(); SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
}
我们会发现代码中这么一段:
-- avoid memory leak
-- 避免内存泄漏
collectgarbage("setpause", 100)
collectgarbage("setstepmul", 5000) require "src/mainMenu"
---------------- -- run local glView = cc.Director:getInstance():getOpenGLView()
local screenSize = glView:getFrameSize()
local designSize = {width = 480, height = 320}
local fileUtils = cc.FileUtils:getInstance() if screenSize.height > 320 then
local searchPaths = {}
table.insert(searchPaths, "hd")
fileUtils:setSearchPaths(searchPaths)
end local targetPlatform = cc.Application:getInstance():getTargetPlatform()
local resPrefix = ""
if cc.PLATFORM_OS_IPAD == targetPlatform or cc.PLATFORM_OS_IPHONE == targetPlatform or cc.PLATFORM_OS_MAC == targetPlatform then
resPrefix = ""
else
resPrefix = "res/"
end local searchPaths = fileUtils:getSearchPaths()
table.insert(searchPaths, 1, resPrefix)
table.insert(searchPaths, 1, resPrefix .. "cocosbuilderRes") if screenSize.height > 320 then
table.insert(searchPaths, 1, resPrefix .. "hd")
table.insert(searchPaths, 1, resPrefix .. "ccs-res")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/Images")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/ArmatureComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/AttributeComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/BackgroundComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/EffectComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/LoadSceneEdtiorFileTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/ParticleComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/SpriteComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/TmxMapComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/UIComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/hd/scenetest/TriggerTest")
else
table.insert(searchPaths, 1, resPrefix .. "ccs-res/Images")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/ArmatureComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/AttributeComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/BackgroundComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/EffectComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/LoadSceneEdtiorFileTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/ParticleComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/SpriteComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/TmxMapComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/UIComponentTest")
table.insert(searchPaths, 1, resPrefix .. "ccs-res/scenetest/TriggerTest")
end fileUtils:setSearchPaths(searchPaths) -- 创建场景
local scene = cc.Scene:create()
-- 加入菜单
scene:addChild(CreateTestMenu())
if cc.Director:getInstance():getRunningScene() then
cc.Director:getInstance():replaceScene(scene)
else
-- 依据给定的场景进入 Director的主循环 仅仅能调用他执行你的第一个场景.
cc.Director:getInstance():runWithScene(scene)
end
然后我们就能够依据这个,来理清整个測试项目的脉路,我们或许想知道,样例中的那些菜单是怎么显示出来的,样例中又是怎样进行切换场景的。仅仅要我们知道怎样開始了,以后我们就能够慢慢分析每个样例所给我提供的代码。
-- 引入资源文件
require "Cocos2d"
require "Cocos2dConstants"
require "Opengl"
require "OpenglConstants"
require "StudioConstants"
require "GuiConstants"
require "src/helper"
require "src/testResource"
require "src/VisibleRect" require "src/AccelerometerTest/AccelerometerTest"
require "src/ActionManagerTest/ActionManagerTest"
require "src/ActionsEaseTest/ActionsEaseTest"
require "src/ActionsProgressTest/ActionsProgressTest"
require "src/ActionsTest/ActionsTest"
require "src/AssetsManagerTest/AssetsManagerTest"
require "src/BugsTest/BugsTest"
require "src/ClickAndMoveTest/ClickAndMoveTest"
require "src/CocosDenshionTest/CocosDenshionTest"
require "src/CocoStudioTest/CocoStudioTest"
require "src/CurrentLanguageTest/CurrentLanguageTest"
require "src/DrawPrimitivesTest/DrawPrimitivesTest"
require "src/EffectsTest/EffectsTest"
require "src/EffectsAdvancedTest/EffectsAdvancedTest"
require "src/ExtensionTest/ExtensionTest"
require "src/FontTest/FontTest"
require "src/IntervalTest/IntervalTest"
require "src/KeypadTest/KeypadTest"
require "src/LabelTest/LabelTest"
require "src/LabelTestNew/LabelTestNew"
require "src/LayerTest/LayerTest"
require "src/MenuTest/MenuTest"
require "src/MotionStreakTest/MotionStreakTest"
require "src/NewEventDispatcherTest/NewEventDispatcherTest"
require "src/NodeTest/NodeTest"
require "src/OpenGLTest/OpenGLTest"
require "src/ParallaxTest/ParallaxTest"
require "src/ParticleTest/ParticleTest"
require "src/PerformanceTest/PerformanceTest"
require "src/RenderTextureTest/RenderTextureTest"
require "src/RotateWorldTest/RotateWorldTest"
require "src/Sprite3DTest/Sprite3DTest"
require "src/SpriteTest/SpriteTest"
require "src/SceneTest/SceneTest"
require "src/SpineTest/SpineTest"
require "src/Texture2dTest/Texture2dTest"
require "src/TileMapTest/TileMapTest"
require "src/TouchesTest/TouchesTest"
require "src/TransitionsTest/TransitionsTest"
require "src/UserDefaultTest/UserDefaultTest"
require "src/ZwoptexTest/ZwoptexTest"
require "src/LuaBridgeTest/LuaBridgeTest"
require "src/XMLHttpRequestTest/XMLHttpRequestTest"
require "src/PhysicsTest/PhysicsTest" -- 行间距
local LINE_SPACE = 40 -- 当前位置
local CurPos = {x = 0, y = 0}
-- 開始位置
local BeginPos = {x = 0, y = 0} -- 定义一张表
local _allTests = {
{ isSupported = true, name = "Accelerometer" , create_func= AccelerometerMain },
{ isSupported = true, name = "ActionManagerTest" , create_func = ActionManagerTestMain },
{ isSupported = true, name = "ActionsEaseTest" , create_func = EaseActionsTest },
{ isSupported = true, name = "ActionsProgressTest" , create_func = ProgressActionsTest },
{ isSupported = true, name = "ActionsTest" , create_func = ActionsTest },
{ isSupported = true, name = "AssetsManagerTest" , create_func = AssetsManagerTestMain },
{ isSupported = false, name = "Box2dTest" , create_func= Box2dTestMain },
{ isSupported = false, name = "Box2dTestBed" , create_func= Box2dTestBedMain },
{ isSupported = true, name = "BugsTest" , create_func= BugsTestMain },
{ isSupported = false, name = "ChipmunkAccelTouchTest" , create_func= ChipmunkAccelTouchTestMain },
{ isSupported = true, name = "ClickAndMoveTest" , create_func = ClickAndMoveTest },
{ isSupported = true, name = "CocosDenshionTest" , create_func = CocosDenshionTestMain },
{ isSupported = true, name = "CocoStudioTest" , create_func = CocoStudioTestMain },
{ isSupported = false, name = "CurlTest" , create_func= CurlTestMain },
{ isSupported = true, name = "CurrentLanguageTest" , create_func= CurrentLanguageTestMain },
{ isSupported = true, name = "DrawPrimitivesTest" , create_func= DrawPrimitivesTest },
{ isSupported = true, name = "EffectsTest" , create_func = EffectsTest },
{ isSupported = true, name = "EffectAdvancedTest" , create_func = EffectAdvancedTestMain },
{ isSupported = true, name = "ExtensionsTest" , create_func= ExtensionsTestMain },
{ isSupported = true, name = "FontTest" , create_func = FontTestMain },
{ isSupported = true, name = "IntervalTest" , create_func = IntervalTestMain },
{ isSupported = true, name = "KeypadTest" , create_func= KeypadTestMain },
{ isSupported = true, name = "LabelTest" , create_func = LabelTest },
{ isSupported = true, name = "LabelTestNew" , create_func = LabelTestNew },
{ isSupported = true, name = "LayerTest" , create_func = LayerTestMain },
{ isSupported = true, name = "LuaBridgeTest" , create_func = LuaBridgeMainTest },
{ isSupported = true, name = "MenuTest" , create_func = MenuTestMain },
{ isSupported = true, name = "MotionStreakTest" , create_func = MotionStreakTest },
{ isSupported = false, name = "MutiTouchTest" , create_func= MutiTouchTestMain },
{ isSupported = true, name = "NewEventDispatcherTest" , create_func = NewEventDispatcherTest },
{ isSupported = true, name = "NodeTest" , create_func = CocosNodeTest },
{ isSupported = true, name = "OpenGLTest" , create_func= OpenGLTestMain },
{ isSupported = true, name = "ParallaxTest" , create_func = ParallaxTestMain },
{ isSupported = true, name = "ParticleTest" , create_func = ParticleTest },
{ isSupported = true, name = "PerformanceTest" , create_func= PerformanceTestMain },
{ isSupported = true, name = "PhysicsTest" , create_func = PhysicsTest },
{ isSupported = true, name = "RenderTextureTest" , create_func = RenderTextureTestMain },
{ isSupported = true, name = "RotateWorldTest" , create_func = RotateWorldTest },
{ isSupported = true, name = "SceneTest" , create_func = SceneTestMain },
{ isSupported = true, name = "SpineTest" , create_func = SpineTestMain },
{ isSupported = false, name = "SchdulerTest" , create_func= SchdulerTestMain },
{ isSupported = false, name = "ShaderTest" , create_func= ShaderTestMain },
{ isSupported = true, name = "Sprite3DTest" , create_func = Sprite3DTest },
{ isSupported = true, name = "SpriteTest" , create_func = SpriteTest },
{ isSupported = false, name = "TextInputTest" , create_func= TextInputTestMain },
{ isSupported = true, name = "Texture2DTest" , create_func = Texture2dTestMain },
{ isSupported = false, name = "TextureCacheTest" , create_func= TextureCacheTestMain },
{ isSupported = true, name = "TileMapTest" , create_func = TileMapTestMain },
{ isSupported = true, name = "TouchesTest" , create_func = TouchesTest },
{ isSupported = true, name = "TransitionsTest" , create_func = TransitionsTest },
{ isSupported = true, name = "UserDefaultTest" , create_func= UserDefaultTestMain },
{ isSupported = true, name = "XMLHttpRequestTest" , create_func = XMLHttpRequestTestMain },
{ isSupported = true, name = "ZwoptexTest" , create_func = ZwoptexTestMain }
} local TESTS_COUNT = table.getn(_allTests) -- create scene 创建场景
local function CreateTestScene(nIdx)
cc.Director:getInstance():purgeCachedData()
local scene = _allTests[nIdx].create_func()
return scene
end
-- create menu 创建菜单
function CreateTestMenu()
-- 菜单层
local menuLayer = cc.Layer:create() local function closeCallback()
-- 结束执行,释放正在执行的场景。
cc.Director:getInstance():endToLua()
end -- 菜单回调
local function menuCallback(tag)
print(tag)
local Idx = tag - 10000
local testScene = CreateTestScene(Idx)
if testScene then
-- 切换场景
cc.Director:getInstance():replaceScene(testScene)
end
end -- add close menu 加入关闭菜单
local s = cc.Director:getInstance():getWinSize()
local CloseItem = cc.MenuItemImage:create(s_pPathClose, s_pPathClose)
CloseItem:registerScriptTapHandler(closeCallback)
CloseItem:setPosition(cc.p(s.width - 30, s.height - 30)) local CloseMenu = cc.Menu:create()
CloseMenu:setPosition(0, 0)
CloseMenu:addChild(CloseItem)
menuLayer:addChild(CloseMenu)
-- 获取目标平台
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) then
CloseMenu:setVisible(false)
end -- add menu items for tests
-- 加入菜单项
local MainMenu = cc.Menu:create()
local index = 0
local obj = nil
for index, obj in pairs(_allTests) do
-- 创建文本(obj.name 为文本名称, s_arialPath为字体,24为字体大小)
local testLabel = cc.Label:createWithTTF(obj.name, s_arialPath, 24)
-- 设置锚点
testLabel:setAnchorPoint(cc.p(0.5, 0.5))
-- 创建菜单项标签
local testMenuItem = cc.MenuItemLabel:create(testLabel)
-- 假设此项不支持,则设置菜单项不可用
if not obj.isSupported then
testMenuItem:setEnabled(false)
end
-- 注冊脚本处理句柄
testMenuItem:registerScriptTapHandler(menuCallback)
-- 设置菜单标签显示的位置,设置到居中的位置
testMenuItem:setPosition(cc.p(s.width / 2, (s.height - (index) * LINE_SPACE)))
-- 加入菜单项到菜单中去
MainMenu:addChild(testMenuItem, index + 10000, index + 10000)
end -- 设置菜单内容大小
MainMenu:setContentSize(cc.size(s.width, (TESTS_COUNT + 1) * (LINE_SPACE)))
MainMenu:setPosition(CurPos.x, CurPos.y)
-- 将菜单加入到层中去
menuLayer:addChild(MainMenu) -- handling touch events
-- 处理触摸事件
local function onTouchBegan(touch, event)
-- 获取触摸点的位置
BeginPos = touch:getLocation()
-- CCTOUCHBEGAN event must return true
return true
end -- 手指移动时触发
local function onTouchMoved(touch, event)
local location = touch:getLocation()
local nMoveY = location.y - BeginPos.y
local curPosx, curPosy = MainMenu:getPosition()
local nextPosy = curPosy + nMoveY
local winSize = cc.Director:getInstance():getWinSize()
if nextPosy < 0 then
MainMenu:setPosition(0, 0)
return
end if nextPosy > ((TESTS_COUNT + 1) * LINE_SPACE - winSize.height) then
MainMenu:setPosition(0, ((TESTS_COUNT + 1) * LINE_SPACE - winSize.height))
return
end --
MainMenu:setPosition(curPosx, nextPosy)
BeginPos = {x = location.x, y = location.y}
CurPos = {x = curPosx, y = nextPosy}
end -- 创建事件监听器
local listener = cc.EventListenerTouchOneByOne:create()
-- 注冊事件监听
listener:registerScriptHandler(onTouchBegan,cc.Handler.EVENT_TOUCH_BEGAN )
listener:registerScriptHandler(onTouchMoved,cc.Handler.EVENT_TOUCH_MOVED )
-- 获取事件派发器
local eventDispatcher = menuLayer:getEventDispatcher()
eventDispatcher:addEventListenerWithSceneGraphPriority(listener, menuLayer) return menuLayer
end
我们就能够发现,这里就是界面中菜单的实现,mainMenu中还引入了其它文件,比方testResource.lua
s_pPathGrossini = "Images/grossini.png"
s_pPathSister1 = "Images/grossinis_sister1.png"
s_pPathSister2 = "Images/grossinis_sister2.png"
s_pPathB1 = "Images/b1.png"
s_pPathB2 = "Images/b2.png"
s_pPathR1 = "Images/r1.png"
s_pPathR2 = "Images/r2.png"
s_pPathF1 = "Images/f1.png"
s_pPathF2 = "Images/f2.png"
s_pPathBlock = "Images/blocks.png"
s_back = "Images/background.png"
s_back1 = "Images/background1.png"
s_back2 = "Images/background2.png"
s_back3 = "Images/background3.png"
s_stars1 = "Images/stars.png"
s_stars2 = "Images/stars2.png"
s_fire = "Images/fire.png"
s_snow = "Images/snow.png"
s_streak = "Images/streak.png"
s_PlayNormal = "Images/btn-play-normal.png"
s_PlaySelect = "Images/btn-play-selected.png"
s_AboutNormal = "Images/btn-about-normal.png"
s_AboutSelect = "Images/btn-about-selected.png"
s_HighNormal = "Images/btn-highscores-normal.png"
s_HighSelect = "Images/btn-highscores-selected.png"
s_Ball = "Images/ball.png"
s_Paddle = "Images/paddle.png"
s_pPathClose = "Images/close.png"
s_MenuItem = "Images/menuitemsprite.png"
s_SendScore = "Images/SendScoreButton.png"
s_PressSendScore = "Images/SendScoreButtonPressed.png"
s_Power = "Images/powered.png"
s_AtlasTest = "Images/atlastest.png" -- tilemaps resource
s_TilesPng = "TileMaps/tiles.png"
s_LevelMapTga = "TileMaps/levelmap.tga" -- spine test resource
s_pPathSpineBoyJson = "spine/spineboy.json"
s_pPathSpineBoyAtlas = "spine/spineboy.atlas" -- fonts resource
s_markerFeltFontPath = "fonts/Marker Felt.ttf"
s_arialPath = "fonts/arial.ttf"
s_thonburiPath = "fonts/Thonburi.ttf"
s_tahomaPath = "fonts/tahoma.ttf"
这个文件定义了全部的资源路径,一些图片、json资源、字体资源等。
Cocos2d-x 3.1.1 lua-tests 开篇的更多相关文章
- Cocos2d Lua 越来越小样本 内存游戏
1.游戏简介 一个"记忆"类的比赛游戏.你和电脑对战,轮到谁的回合,谁翻两张牌,假设两张牌一样.就消掉这两张牌,得2分,能够继续翻牌,假设两张牌不一样,就换一个人.直到最后.看谁的 ...
- 在cocos code ide的基础上构建自己的lua开发调试环境
对于一种语言,其所谓开发调试环境, 大体有以下两方面的内容: 1.开发, 即代码编写, 主要是代码提示.补齐, 更高级一点的如变量名颜色等. 2.调试, 主要是运行状态下断点.查看变量.堆栈等. 现在 ...
- cocos2d-x 使用Lua
转自:http://www.benmutou.com/blog/archives/49 1. Lua的堆栈和全局表 我们来简单解释一下Lua的堆栈和全局表,堆栈大家应该会比较熟悉,它主要是用来让C++ ...
- Cocos Code IDE + Lua初次使用FastTiledMap的坑
近期想玩玩Lua.又想玩玩Cocos Code IDE.更加想写一个即时战斗的.防守的.会动的.有迷雾的.要探索的(旁白:给我停!)跑地图游戏. 于是我就用Cocos Code IDE来写游戏了.挑战 ...
- LTUI v1.1, 一个基于lua的跨平台字符终端UI界面库
简介 LTUI是一个基于lua的跨平台字符终端UI界面库. 此框架源于xmake中图形化菜单配置的需求,类似linux kernel的menuconf去配置编译参数,因此基于curses和lua实现了 ...
- 关于Protobuf在游戏开发中的运用
最近在研究protobuf在项目中的使用,由于我们项目服务端采用的是C++,客户端是cocos2dx-cpp,客户端与服务端的消息传输是直接对象的二进制流.如果客户端一直用C++来写,问题到不大,但是 ...
- A*算法实现
A* 算法非常简单.算法维护两个集合:OPEN 集和 CLOSED 集.OPEN 集包含待检测节点.初始状态,OPEN集仅包含一个元素:开始位置.CLOSED集包含已检测节点.初始状态,CLOSED集 ...
- Windows 安装 python2.7
Windows 安装 python2.7 python2.7下载地址: https://www.python.org/downloads/release/python-2714/ 安装过程: 设置系统 ...
- 数据库性能测试:sysbench用法详解
1.简介和安装 sysbench是一个很不错的数据库性能测试工具. 官方站点:https://github.com/akopytov/sysbench/ rpm包下载:https://packagec ...
随机推荐
- Objective-C基础笔记(5)Protocol
Protocol简单来说就是一系列方法的列表,当中声明的方法能够被不论什么类实现.这中模式一般称为代理(delegation)模式. 在IOS和OS X开发中,Apple採用了大量的代理模式来实现MV ...
- WCF技术剖析之二十一: WCF基本的异常处理模式[上篇]
原文:WCF技术剖析之二十一: WCF基本的异常处理模式[上篇] 由于WCF采用.NET托管语言(C#和NET)作为其主要的编程语言,注定以了基于WCF的编程方式不可能很复杂.同时,WCF设计的一个目 ...
- Hough变换在opencv中的应用
霍夫曼变换(Hough Transform)的原理 霍夫曼变换是一种可以检测出某种特殊形状的算法,OpenCV中用霍夫曼变换来检测出图像中的直线.椭圆和其他几何图形.由它改进的算法,可以用来检测任何形 ...
- 基于visual Studio2013解决C语言竞赛题之1038数字验证
题目 解决代码及点评 /********************************************************************** ...
- codeforces 148D 概率DP
题意: 原来袋子里有w仅仅白鼠和b仅仅黑鼠 龙和王妃轮流从袋子里抓老鼠. 谁先抓到白色老师谁就赢. 王妃每次抓一仅仅老鼠,龙每次抓完一仅仅老鼠之后会有一仅仅老鼠跑出来. 每次抓老鼠和跑出来的老鼠都是随 ...
- crm使用FetchXml聚合查询
/* 创建者:菜刀居士的博客 * 创建日期:2014年07月08号 */ namespace Net.CRM.FetchXml { using System; using Micr ...
- C++学习之路—引用(一)—基础知识
(根据<C++程序设计>(谭浩强)整理,整理者:华科小涛,@http://www.cnblogs.com/hust-ghtao转载请注明) 对一个数据可以建立一个“引用”,它的作用是为一个 ...
- 进阶: 案例八: Drag and Drop(动态)
1.节点 2.UI 3. 4.方法: METHOD wddomodifyview . DATA: lo_container TYPE REF TO cl_wd_uielement_container, ...
- 为数据元素DATA Element分配搜索帮助
搜索帮助可以分配给数据元素,程序中可以直接参照该数据元素具体如下: 1. 2. 程序中使用. PARAMETERS:p_vbeln TYPE ZVBELN_01. 3. 效果:
- Jsp中使用数据库连接池.
原文 Jsp中使用数据库连接池. 1. 在tomcat服务器目录下面的conf中找到一个叫Context.xml的配置文件,在其中加入以下代码 <Resource name="jdbc ...